mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-29 13:00:32 +01:00
79a8f439b6
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
29 lines
679 B
Bash
29 lines
679 B
Bash
#!/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
|