postinst is in siproxd 1:0.8.1-4build1.
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 | #!/bin/sh
set -e
case "$1" in
configure)
if ! getent passwd siproxd > /dev/null ; then
echo 'Adding system-user for siproxd' 1>&2
adduser --system --group --home /var/run/siproxd --no-create-home \
--disabled-login --force-badname siproxd > /dev/null
fi
if dpkg --compare-versions "$2" le "0.57.snap040720-2"; then
[ -e /etc/siproxd.conf -a -e /etc/siproxd_passwd.cfg ] && chown root:siproxd /etc/siproxd.conf /etc/siproxd_passwd.cfg
[ -e /etc/siproxd_passwd.cfg ] && chmod 600 /etc/siproxd_passwd.cfg
fi
;;
esac
# Create directories for log etc
# install also fixes permissions.
# Bad naming f0llowing the exim4 example ;)
install -d -o siproxd -g siproxd /var/lib/siproxd/var/lib/siproxd
chown -R siproxd:siproxd /var/lib/siproxd
mkdir -p /var/run/siproxd
chown siproxd:siproxd /var/run/siproxd
# Automatically added by dh_installinit
if [ -x "/etc/init.d/siproxd" ] || [ -e "/etc/init/siproxd.conf" ]; then
if [ ! -e "/etc/init/siproxd.conf" ]; then
update-rc.d siproxd defaults >/dev/null
fi
invoke-rc.d siproxd start || exit $?
fi
# End automatically added section
|