debian: use wcs-manage to run hobo_deploy (#83658)
gitea/wcs/pipeline/head This commit looks good Details

This commit is contained in:
Frédéric Péters 2023-11-17 13:45:42 +01:00
parent 3f9d1327e7
commit 01426813b4
1 changed files with 1 additions and 9 deletions

10
debian/wcs.postinst vendored
View File

@ -3,11 +3,9 @@
set -e
NAME=wcs
DAEMON=/usr/bin/wcsctl
USER=$NAME
GROUP=$NAME
CONFIG_DIR=/etc/wcs
CONFIG_FILE=/etc/wcs/wcs.cfg
MANAGE_SCRIPT="/usr/bin/$NAME-manage"
# Read config file if it is present.
@ -16,12 +14,6 @@ then
. /etc/default/$NAME
fi
if [ $CONFIG_FILE ]; then
COMMAND="$DAEMON -f $CONFIG_FILE"
else
COMMAND="$DAEMON"
fi
case "$1" in
configure)
@ -49,7 +41,7 @@ case "$1" in
;;
triggered)
su -s /bin/sh -c "$COMMAND hobo_deploy --redeploy" $USER
su -s /bin/sh -c "$MANAGE_SCRIPT hobo_deploy --redeploy" $USER
su -s /bin/sh -c "$MANAGE_SCRIPT collectstatic" $USER
exit 0
;;