Commit fc6f61e5 authored by Mikaël Salson's avatar Mikaël Salson

nginx_install: Change init scripts

Only one exec per script (otherwise the first overwrites the whole process).
chdir can be performed directly by upstart.
parent 1359c5ed
......@@ -253,12 +253,22 @@ echo "
description \"web2py vidjil task scheduler\"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
respawn limit 8 60 # Give up if restart occurs 8 times in 60 seconds.
exec sudo -u www-data python $CWD/web2py/web2py.py -K vidjil
respawn
exec sudo -u www-data sh -c \"cd $CWD; python fuse_server.py\"
respawn limit 8 60 # Give up if restart occurs 8 times in 60 seconds.
exec sudo -u www-data python $CWD/web2py/web2py.py -K vidjil,vidjil,vidjil
" > /etc/init/web2py-scheduler.conf
echo "
description \"fuse server vidjil\"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
respawn
respawn limit 8 60 # Give up if restart occurs 8 times in 60 seconds.
chdir $CWD
exec sudo -u www-data python fuse_server.py
" > /etc/init/fuse-server.conf
## you can reload uwsgi with
# restart uwsgi-emperor
## and stop it with
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment