smart passerelle-manage

This commit is contained in:
Thomas NOËL 2014-10-02 16:31:47 +02:00
parent 85c73a3509
commit b5a1437136
1 changed files with 19 additions and 1 deletions

20
passerelle-manage Normal file → Executable file
View File

@ -1,3 +1,21 @@
#!/bin/sh
/etc/init.d/passerelle manage "$@"
NAME=passerelle
if test $(id -un) != "$NAME"
then
echo "error: must use $0 with user ${NAME}"
exit 1
fi
MANAGE_OPTIONS="--config=/usr/lib/${NAME}/debian_config.py"
. /etc/default/$NAME
if test x"${DJANGO_SETTINGS_MODULE}" = "xpasserelle.tenant_settings"
then
MANAGE_OPTIONS="${MANAGE_OPTIONS} --multitenant"
fi
echo python /usr/lib/$NAME/manage.py ${MANAGE_OPTIONS} "$@"
python /usr/lib/$NAME/manage.py ${MANAGE_OPTIONS} "$@"