startup and shutdown scripts

This commit is contained in:
Justin Dearing 2016-03-22 01:19:56 -04:00
parent 2ddda7711e
commit b092f9ff7b
2 changed files with 8 additions and 0 deletions

5
daemonise.sh Normal file
View file

@ -0,0 +1,5 @@
#!/usr/bin/bash
cd /usr/local/phpci/phpci
PATH=/usr/local/phpci:$PATH
nohup php ./daemonise phpci:daemonise >/dev/null 2>&1 & echo $! > /usr/local/phpci/phpci.daemonise.pid

3
daemonise_stop.sh Normal file
View file

@ -0,0 +1,3 @@
#!/usr/bin/bash
kill `ps -T \`cat /usr/local/phpci/phpci.daemonise.pid\` | sed 's/^ *\([0-9]*\).*/\1/' | tr '\n' ' '`