debian: add manage wrapper script

This commit is contained in:
Frédéric Péters 2021-06-01 11:26:58 +02:00
parent 9270265662
commit a8b6b97b23
1 changed files with 25 additions and 0 deletions

25
debian/pfwb-archives-proxy-manage vendored Executable file
View File

@ -0,0 +1,25 @@
#!/bin/sh
NAME=pfwb-archives-proxy
MANAGE=/usr/lib/$NAME/manage.py
# load Debian default configuration
export PFWB_ARCHIVES_PROXY_SETTINGS_FILE=/usr/lib/$NAME/debian_config.py
# check user
if test x$1 = x"--forceuser"
then
shift
elif test $(id -un) != "$NAME"
then
echo "error: must use $0 with user ${NAME}"
exit 1
fi
if test $# -eq 0
then
python3 ${MANAGE} help
exit 1
fi
python3 ${MANAGE} "$@"