From 2543fa4f78445ba82d1cbc736a19db5320b8c0e7 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Wed, 19 Oct 2011 16:27:38 +0200 Subject: [PATCH] add pid to upstart --- etc/init/pandora-encoding.conf | 2 ++ etc/init/pandora-tasks.conf | 2 ++ etc/init/pandora.conf | 2 ++ reload.sh | 1 + 4 files changed, 7 insertions(+) create mode 100755 reload.sh diff --git a/etc/init/pandora-encoding.conf b/etc/init/pandora-encoding.conf index bd4410018..fdeddbc76 100644 --- a/etc/init/pandora-encoding.conf +++ b/etc/init/pandora-encoding.conf @@ -14,10 +14,12 @@ env HOME=/home/pandora script test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $USER:$USER /var/log/pandora) +test -e /var/run/pandora || (mkdir -p /var/run/pandora && chown $USER:$USER /var/run/pandora) cd $VENV/pandora exec /usr/bin/sudo -u $USER $VENV/bin/python $VENV/pandora/manage.py celeryd \ -Q encoding \ -n pandora-encoding \ + -p /var/run/pandora/pandora-encoding.pid \ -f /var/log/pandora/pandora-encoding.log \ -l INFO end script diff --git a/etc/init/pandora-tasks.conf b/etc/init/pandora-tasks.conf index 532623c10..0bb3de0e7 100644 --- a/etc/init/pandora-tasks.conf +++ b/etc/init/pandora-tasks.conf @@ -14,10 +14,12 @@ env HOME=/home/pandora script test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $USER:$USER /var/log/pandora) +test -e /var/run/pandora || (mkdir -p /var/run/pandora && chown $USER:$USER /var/run/pandora) cd $VENV/pandora exec /usr/bin/sudo -u $USER $VENV/bin/python $VENV/pandora/manage.py celeryd \ -Q default \ -n pandora-default \ + -p /var/run/pandora/pandora-tasks.pid \ -f /var/log/pandora/pandora-tasks.log \ -l INFO end script diff --git a/etc/init/pandora.conf b/etc/init/pandora.conf index a511af88d..cf624360a 100644 --- a/etc/init/pandora.conf +++ b/etc/init/pandora.conf @@ -14,10 +14,12 @@ env HOME=/home/pandora script test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $USER:$USER /var/log/pandora) +test -e /var/run/pandora || (mkdir -p /var/run/pandora && chown $USER:$USER /var/run/pandora) cd $VENV/pandora exec /usr/bin/sudo -u $USER $VENV/bin/gunicorn_django \ --bind 127.0.0.1:2620 \ --timeout 90 \ + -p /var/run/pandora/pandora.pid \ --log-level info --log-file /var/log/pandora/pandora.log \ --workers 5 \ $VENV/pandora/settings.py diff --git a/reload.sh b/reload.sh new file mode 100755 index 000000000..14f6c2c75 --- /dev/null +++ b/reload.sh @@ -0,0 +1 @@ +kill -HUP `cat /var/run/oxdata/oxdata.pid`