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