Skip to content
This repository has been archived by the owner on Feb 2, 2018. It is now read-only.

Spomsky restart issues #2

Open
andymckay opened this issue May 15, 2009 · 2 comments
Open

Spomsky restart issues #2

andymckay opened this issue May 15, 2009 · 2 comments

Comments

@andymckay
Copy link
Owner

Restarting spomsky on the server in Kenya is sometimes failing, causing multiple spomsky processes.

Reported by Matt on Kenya, will occur on Malawi if we use the same scripts.

@mberg
Copy link

mberg commented May 16, 2009

Andy,

Wrote this script below and does a great job with the restart. However, when I try and run it with a chron it breaks the django webserver. Perhaps we should get runserver running on apache. Not sure what's breaking. Jeff Wishnie things we should manage all of this with a PID.

#!/bin/sh

SCRIPTPATH=/home/mvp/projects/mctc
SPOMSKYD=pgrep spomskyd

check to see if rapidsms is running. If not restart.

if [ $SPOMSKYD ] && [$1 == '']
then
echo date +%Y%m%d-%H%M-%S
echo "Spomskyd Running..."
else
pkill spomskyd
pkill -f "python manage.py"
sleep 2
cd $SCRIPTPATH"/logs"
nohup spomskyd --backend=GSM &
cd $SCRIPTPATH
sleep 2
nohup python manage.py route &
nohup python manage.py runserver 0.0.0.0:8000 &
fi
exit

@andymckay
Copy link
Owner Author

Running runserver through Apache would be no problem, its done on your saurihealth server. Never tried route, but I'm sure that can be done with Apache.

I don't think spomsky writes PID's and would need changing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants