worker init script

revision 418b57716dd3b21c9459b547588a7df9e8f7a049

raw

init-script.sh

1
2
3
4
5
6
7
8
9
# This file goes in something like
# /etc/init/service-name
 
start on runlevel [2345]
stop on runlevel [016]
 
respawn
exec sudo -u www /full/path/to/start.sh >> /var/log/worker.log 2>&1
 
raw

start.sh

1
2
3
4
5
#!/bin/bash
 
cd /web/example.com/scripts
/usr/bin/php /web/example.com/scripts/run.php
 

History