postinst is in celeryd 3.1.20-1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | #!/bin/sh
set -e
case "$1" in
configure|reconfigure)
if ! getent passwd celery > /dev/null ; then
echo 'Adding system user for Celery' 1>&2
adduser \
--system \
--quiet \
--home /nonexistant \
--no-create-home \
--group \
--gecos "Celery daemon" \
celery
fi
if ! dpkg-statoverride --list /var/log/celery >/dev/null; then
chown celery:adm /var/log/celery
chmod 750 /var/log/celery
fi
;;
abort-upgrade|abort-remove|abort-deconfigure)
exit 0
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/celerybeat" ]; then
update-rc.d celerybeat defaults >/dev/null
fi
if [ -x "/etc/init.d/celerybeat" ] || [ -e "/etc/init/celerybeat.conf" ]; then
invoke-rc.d celerybeat start || exit $?
fi
fi
# End automatically added section
# Automatically added by dh_installinit
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/celeryd" ]; then
update-rc.d celeryd defaults >/dev/null
fi
if [ -x "/etc/init.d/celeryd" ] || [ -e "/etc/init/celeryd.conf" ]; then
invoke-rc.d celeryd start || exit $?
fi
fi
# End automatically added section
exit 0
|