From 1b402d2a7ec8bf81fc759176a12aa5d450973ebc Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 20 Sep 2013 12:01:39 +0200 Subject: [PATCH] debian/wcsinstd: make init script usable by the wcsinstd user --- debian/wcsinstd.init | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/debian/wcsinstd.init b/debian/wcsinstd.init index 0c6553a..cf6c93b 100644 --- a/debian/wcsinstd.init +++ b/debian/wcsinstd.init @@ -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