debian: add postinst and triggers files for hobo-redeploy (#8894)
This commit is contained in:
parent
0257dee49f
commit
208152976b
|
@ -0,0 +1,41 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
NAME=wcs
|
||||
DAEMON=/usr/sbin/wcsctl
|
||||
WCS_USER=www-data
|
||||
CONFIG_FILE=/etc/wcs/wcs.cfg
|
||||
|
||||
# Read config file if it is present.
|
||||
if [ -r /etc/default/$NAME ]
|
||||
then
|
||||
. /etc/default/$NAME
|
||||
fi
|
||||
|
||||
if [ $CONFIG_FILE ]; then
|
||||
COMMAND="$DAEMON -f $CONFIG_FILE"
|
||||
else
|
||||
COMMAND="$DAEMON"
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
;;
|
||||
|
||||
triggered)
|
||||
su -c "$COMMAND check_hobos --redeploy" $WCS_USER
|
||||
;;
|
||||
|
||||
abort-upgrade|abort-remove|abort-deconfigure)
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "postinst called with unknown argument \`$1'" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
|
@ -0,0 +1 @@
|
|||
interest-noawait hobo-redeploy
|
Loading…
Reference in New Issue