blob: 588a47f9ff6b4908f7401b413d668eb6d71e23f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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
|