File: postrm

package info (click to toggle)
faqomatic 2.721-6
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,984 kB
  • ctags: 548
  • sloc: perl: 13,356; sh: 69; makefile: 47
file content (17 lines) | stat: -rw-r--r-- 496 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh -e

if [ "$1" = purge ]; then
	rm -rf /var/lib/fom
fi

# If we are being downgraded, we have to make sure users reinstall the
# old style cron job.  Removing this parameter make the installer page
# show the cron job as uninstalled.
if [ "$1" = upgrade ]; then
    VERSION=`echo "$2" | perl -pe 's/-[\d\w+.~]+$//; s/\.//'`;
    if [ $VERSION -le 2719 ];then
	perl -pi.postrm-bak -e 's/^\$maintenanceSecret.*$/\$maintenanceSecret = "";/' /var/lib/fom/meta/config;
    fi
fi

#DEBHELPER#