1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
#!/bin/sh
set -e
case "$1" in
configure)
if dpkg --compare-versions "$2" eq "3.4-1"; then
# remove runtime status files accidentally placed in /usr/sbin
if [ -f /usr/sbin/micro-evtd.standby ]; then
rm /usr/sbin/micro-evtd.standby
fi
if [ -f /usr/sbin/micro-evtd.status ]; then
rm /usr/sbin/micro-evtd.status
fi
fi
if dpkg --compare-versions "$2" lt-nl "3.4-7~"; then
# Fix permissions on the existing pid file
# so that the daemon is actually restarted
if [ -f /var/run/micro-evtd.pid ]; then
chmod 644 /var/run/micro-evtd.pid
fi
if [ -f /var/run/micro-evtd.status ]; then
chmod 644 /var/run/micro-evtd.status
fi
fi
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
#DEBHELPER#
exit 0
|