postinst is in sheepdog 0.8.3-4.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 | #!/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
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/sheepdog" ]; then
update-rc.d sheepdog defaults >/dev/null
fi
if [ -x "/etc/init.d/sheepdog" ] || [ -e "/etc/init/sheepdog.conf" ]; then
invoke-rc.d sheepdog start || exit $?
fi
fi
# End automatically added section
exit 0
|