commit 4dd2929bf70a395c05819209319ed230051c750d parent 5a947bfdacd2a4824d441d050956325838910cc2 Author: clamiax <smoppy@gmail.com> Date: Mon, 14 Apr 2014 12:21:36 +0200 Fix spawncgi. Diffstat:
M | spawncgi | | | 7 | ++++++- |
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/spawncgi b/spawncgi @@ -1,5 +1,10 @@ export PHP_FCGI_MAX_REQUESTS=1000 export PHP_FCGI_CHILDREN=5 -[ $(pgrep -fl php5 |wc -l) -ne 0 ] && pkill -f php5-cgi +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" su -c "/usr/bin/php5-cgi -b 127.0.0.1:9000" www-data &