dev/passerelle.init: log start

This commit is contained in:
Thomas NOËL 2014-10-19 14:18:56 +02:00
parent f4c13eab10
commit 6c738f58af
1 changed files with 7 additions and 5 deletions

View File

@ -28,6 +28,7 @@ LOGFILE=/var/log/$NAME/gunicorn.log
USER=passerelle
GROUP=passerelle
MANAGE=/usr/bin/${NAME}-manage
STARTLOG=/var/log/passerelle/start.log
lockfile=/var/lock/subsys/$NAME
@ -51,22 +52,23 @@ do_create_secret() {
do_migrate() {
# install new applications, if any, migrate others if needed
echo "Applying new migrations (syncdb --migrate)..."
$SCRIPTNAME manage syncdb --migrate --noinput
$SCRIPTNAME manage syncdb --migrate --verbosity=2 --traceback --noinput
}
do_collectstatic() {
echo "Collect static files..."
chown -R passerelle:passerelle /usr/share/passerelle/static
$SCRIPTNAME manage collectstatic --noinput
$SCRIPTNAME manage collectstatic --clear --verbosity=2 --traceback --noinput
chown -R root:root /usr/share/passerelle/static
}
start() {
[ -x $DAEMON ] || exit 5
do_create_secret
do_migrate
do_collectstatic
date > $STARTLOG
do_create_secret >> $STARTLOG 2>&1
do_migrate >> $STARTLOG 2>&1
do_collectstatic >> $STARTLOG 2>&1
echo $"Starting $NAME (via gunicorn): "
daemon $DAEMON --daemon \