scripts

shell scripts
git clone git://git.bitsmanent.org/scripts
Log | Files | Refs | README

commit ffd6801f5923f89a4de1177875f4545584e1978e
parent 741b97e69a7379709b615ebea9a831b674ab6014
Author: clamiax <smoppy@gmail.com>
Date:   Tue, 16 Sep 2014 10:10:06 +0200

More compact spawncgi

Diffstat:
Mspawncgi | 8+-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/spawncgi b/spawncgi @@ -1,10 +1,4 @@ export PHP_FCGI_MAX_REQUESTS=1000 export PHP_FCGI_CHILDREN=5 - -if [ $(id -u) -ne 0 ]; then - echo "You're not root." - exit 1 -fi - -[ $(pgrep -fl php5 |wc -l) -ne 0 ] && su -c "pkill -f php5-cgi" +[ $(pgrep -fl php5 |wc -l) -ne 0 ] && sudo pkill -f php5-cgi sudo -u www-data /usr/bin/php5-cgi -b 127.0.0.1:9000 &