debian/wcsinstd: make init script usable by the wcsinstd user

This commit is contained in:
Benjamin Dauvergne 2013-09-20 12:01:39 +02:00
parent b6111e6ce2
commit 1b402d2a7e
1 changed files with 5 additions and 1 deletions

View File

@ -154,7 +154,11 @@ case "$1" in
;;
manage)
shift
sudo -E -u wcsinstd python /usr/lib/$NAME/manage.py "$@"
if [ $(id -un) != 'wcsinstd' ]; then
sudo -E -u wcsinstd python /usr/lib/$NAME/manage.py "$@"
else
python /usr/lib/$NAME/manage.py "$@"
fi
;;
*)
#echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2