Add manage action to init.d
This commit is contained in:
parent
0ba8023950
commit
e9d72552db
|
@ -37,6 +37,7 @@ Depends: ${misc:Depends}, adduser,
|
|||
python-django-south (>= 0.8.4),
|
||||
python-psycopg2,
|
||||
gunicorn, dbconfig-common,
|
||||
sudo,
|
||||
debconf | debconf-2.0, ucf
|
||||
Recommends: postgresql-client
|
||||
Suggests: nginx, postgresql, authentic2
|
||||
|
|
|
@ -180,6 +180,14 @@ case "$1" in
|
|||
;;
|
||||
esac
|
||||
;;
|
||||
manage)
|
||||
shift
|
||||
if [ $(id -un) != "$USER" ]; then
|
||||
sudo -H -u $USER /usr/bin/portail-citoyen-manage "$@"
|
||||
else
|
||||
/usr/bin/portail-citoyen-manage "$@"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2
|
||||
exit 3
|
||||
|
|
Reference in New Issue