postinst is in sheepdog 0.8.3-5.
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
if [ "$1" = "configure" ] ; then
. /usr/share/debconf/confmodule
mkdir -p /var/lib/sheepdog/
mkdir -p /etc/default
if [ ! -e /etc/default/sheepdog ] ; then
cp /usr/share/sheepdog/debian-sheepdog-default /etc/default/sheepdog
fi
if [ -r /etc/default/sheepdog ] ; then
db_get sheepdog/start
if [ "${RET}" = "true" ] ; then
SERVICE_START="yes"
else
SERVICE_START="no"
fi
sed -i -e "s/^[ \t]*START=.*/START=\"$SERVICE_START\"/g" /etc/default/sheepdog
db_get sheepdog/daemon_args
sed -i -e "s/^[ \t]*DAEMON_ARGS=.*/DAEMON_ARGS=\"$RET\"/g" /etc/default/sheepdog
fi
db_stop || true
fi
# Automatically added by dh_installinit/11.1.3ubuntu1
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
if [ -x "/etc/init.d/sheepdog" ]; then
update-rc.d sheepdog defaults >/dev/null
invoke-rc.d sheepdog start || exit 1
fi
fi
# End automatically added section
exit 0
|