summaryrefslogtreecommitdiff
path: root/network/fcgiwrap/rc.spawn-fcgi
diff options
context:
space:
mode:
authorZhu Qun-Ying <zhu.qunying@gmail.com>2014-11-08 02:13:47 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-11-08 06:30:19 +0700
commit79a8f439b6090adb9770a78d173f7ed5bdcf570a (patch)
treec3e110abdcc6c3a566e5d736980d3099724ff636 /network/fcgiwrap/rc.spawn-fcgi
parent0e6711fd438e1218dcf944ba81cc969dd77c13be (diff)
downloadslackbuilds-79a8f439b6090adb9770a78d173f7ed5bdcf570a.tar.gz
network/fcgiwrap: Added (Simple FastCGI wrapper).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/fcgiwrap/rc.spawn-fcgi')
-rw-r--r--network/fcgiwrap/rc.spawn-fcgi29
1 files changed, 29 insertions, 0 deletions
diff --git a/network/fcgiwrap/rc.spawn-fcgi b/network/fcgiwrap/rc.spawn-fcgi
new file mode 100644
index 0000000000..588a47f9ff
--- /dev/null
+++ b/network/fcgiwrap/rc.spawn-fcgi
@@ -0,0 +1,29 @@
+#!/bin/bash
+C_SCRIPT=/usr/sbin/spawn-fcgi
+USER=nobody
+GROUP=nogroup
+RETVAL=0
+case "$1" in
+ start)
+ echo "Starting fastcgi"
+ sudo -u $USER $C_SCRIPT /tmp/cgi.sock 2
+ chown $USER:$GROUP /tmp/cgi.sock
+ RETVAL=$?
+ ;;
+ stop)
+ echo "Stopping fastcgi"
+ killall -9 fcgiwrap
+ RETVAL=$?
+ ;;
+ restart)
+ echo "Restarting fastcgi"
+ killall -9 fcgiwrap
+ sudo -u $USER $C_SCRIPT
+ RETVAL=$?
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart}"
+ exit 1
+ ;;
+esac
+exit $RETVAL