-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnginxcgi.sh
More file actions
executable file
·30 lines (29 loc) · 794 Bytes
/
Copy pathnginxcgi.sh
File metadata and controls
executable file
·30 lines (29 loc) · 794 Bytes
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
30
#!/bin/sh
case "$1" in
start)
echo 'nginx starting...'
/bktdisk/local/nginx/sbin/nginx
echo 'spawn-fcgi starting...'
/bktdisk/local/spawn-fcgi/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u apache -g apache -f /bktdisk/local/php/bin/php-cgi -C 20
;;
stop)
echo 'nginx stopping...'
killall nginx
echo 'spawn-fcgi stopping...'
killall php-cgi
;;
restart)
echo 'nginx stopping...'
killall nginx
echo 'spawn-fcgi stopping...'
killall php-cgi
sleep 1
echo 'nginx starting...'
/bktdisk/local/nginx/sbin/nginx
echo 'spawn-fcgi starting...'
/bktdisk/local/spawn-fcgi/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u apache -g apache -f /bktdisk/local/php/bin/php-cgi -C 20
;;
*)
echo "Use: {start|stop|restart}"
esac
exit