-
Notifications
You must be signed in to change notification settings - Fork 51
/
nginx
31 lines (30 loc) · 837 Bytes
/
nginx
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
31
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /usr/local/nginx/conf/nginx.conf
# pidfile: /var/run/nginx.pid
case $1 in
'start')
/usr/local/nginx/sbin/nginx
echo 'Nginx started successfully.'
echo '----------------------------'
ps -ef|grep 'nginx'
echo '----------------------------'
;;
'reload')
/usr/local/nginx/sbin/nginx -s quit
/usr/local/nginx/sbin/nginx -s stop
pkill nginx
echo 'Nginx stopped succeeding.'
;;
3) echo '数字3'
;;
4) echo '数字4'
;;
*) echo '不是1-4'
esac