update debian for the new settings system

This commit is contained in:
Jérôme Schneider 2014-10-27 18:34:59 +01:00
parent 614aa1ed5c
commit c308fbe46b
4 changed files with 29 additions and 0 deletions

4
init.d
View File

@ -18,6 +18,7 @@ PID_DIR=/var/run/mandaye-cud
PIDFILE=/var/run/mandaye-cud/$NAME.pid
LOG_DIR=/var/log/mandaye-cud
SCRIPTNAME=/etc/init.d/$NAME
MANDAYE_CONFIG_FILES=/etc/$NAME/config.ini
USER=mandaye-cud
GROUP=mandaye-cud
@ -49,6 +50,9 @@ mandaye_cud.wsgi:application"
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions
# environment for wsgi & settings
export MANDAYE_CONFIG_FILES
#
# Function that starts the daemon/service
#

View File

@ -1 +1,2 @@
debian/config.ini /etc/mandaye-cud/
debian/mandaye_cud_manager /usr/bin/

22
mandaye_cud_manager Normal file
View File

@ -0,0 +1,22 @@
#!/bin/sh
NAME=mandaye-cud
MANAGER="/usr/lib/$NAME/manager.py --config=/etc/$NAME/config.ini"
# 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
python ${MANAGER} --help
exit 1
fi
python ${MANAGER} "$@"

2
rules
View File

@ -7,4 +7,6 @@ BUILD_DIR=$(CURDIR)/debian/mandaye-cud
override_dh_install:
dh_install
mv $(BUILD_DIR)/usr/bin/server.py $(BUILD_DIR)/usr/lib/mandaye-cud
mv $(BUILD_DIR)/usr/bin/manager.py $(BUILD_DIR)/usr/lib/mandaye-cud
cp -R mandaye_cud/static $(BUILD_DIR)/usr/share/mandaye-cud