mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
35 lines
1 KiB
Text
35 lines
1 KiB
Text
# 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
|
|
}
|