PKGBUILDs/community/cherokee/cherokee.install

36 lines
1 KiB
Text
Raw Normal View History

2009-10-10 02:15:33 +00:00
# Returns only the major and minor parts of a version number
major_minor() {
echo $(expr "$1" : '\([^\.]*\.[^\.]*\)')
}
post_upgrade() {
# We use http.http from now on. Change introduced in 0.98.1-2.
if [ $(vercmp 0.98.1-2 $2) -gt 0 ]; then
echo -n ">>> Removing cherokee system user and group... "
userdel cherokee &>/dev/null
groupdel cherokee &>/dev/null
echo "done."
fi
# Prior to 0.99.13-1, the logrotate file was installed with 755 permissions
if [ $(vercmp 0.99.13-1 $2) -gt 0 ]; then
chmod -x etc/logrotate.d/cherokee
fi
# If upgrading from an earlier version, the configuration file
# may need to be converted
if [ $(vercmp $(major_minor $1) $(major_minor $2)) -gt 0 ]; then
cat << EOM
==> Configuration conversion is possibly required
Since you're upgrading from an older version, you may need to
convert your configuration file (i.e. /etc/cherokee/cherokee.conf)
to be compatible with the new cherokee version.
Converters have been installed in /usr/share/cherokee/converters
EOM
fi
}