scripts

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

commit 0bd2634e849da98b3766434bfe66fce1d537f69f
parent 2e090bd0a7d54e12d0aebf75ca5a6a1f6e8adfd2
Author: clamiax <smoppy@gmail.com>
Date:   Wed, 17 Sep 2014 09:38:25 +0200

Make spawncgi works properly.

Diffstat:
Mspawncgi | 10++++++----
1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/spawncgi b/spawncgi @@ -1,8 +1,10 @@ export PHP_FCGI_MAX_REQUESTS=1000 export PHP_FCGI_CHILDREN=5 -# Make sure sudo don't complain -sudo true +if [ "$(id -un)" != "www-data" ]; then + echo "Usage: sudo -Eu www-data $0" + exit 1 +fi -[ $(pgrep -fl php5 |wc -l) -ne 0 ] && sudo pkill -f php5-cgi -sudo -Eu www-data /usr/bin/php5-cgi -b 127.0.0.1:9000 & +[ $(pgrep -fl php5 |wc -l) -ne 0 ] && pkill -f php5-cgi +/usr/bin/php5-cgi -b 127.0.0.1:9000 &