Add manage action to init.d

This commit is contained in:
Benjamin Dauvergne 2014-09-16 11:52:25 +02:00
parent 0ba8023950
commit e9d72552db
2 changed files with 9 additions and 0 deletions

1
debian/control vendored
View File

@ -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

View File

@ -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