Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Nginx startup script

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

#! / bin/sh#nginx start script#Date:2017-6-21#Author:xcn (baishuchao@yeah.net) # version 2.0 RETVALLY0path0 = "/ application/nginx" # Source functions library. / etc/init.d/functionsstart () {if [!-f "$path/logs/nginx.pid"] then [- x $path/sbin/nginx] | | exit 1$ path/sbin/nginx RETVAL=$? If [- f $path/logs/nginx.pid]; then action "Nginx startup" / bin/true else action "Nginx startup" / bin/false fielse echo "Nginx is running." fireturn $RETVAL} stop () {if [!-f "$path/logs/nginx.pid"] then echo "nginx is not running.need not to stop it." Else [- x $path/sbin/nginx] | | exit 1 [- f "$path/logs/nginx.pid"] & & {kill `cat $path/logs/ nginx.pid` RETVAL=$?} if [!-f "$path/logs/nginx.pid"]; then action "Nginx is stopped." / bin/true else action "Nginx is stopped." / bin/false fifireturn $RETVAL} case "$1" in start) start RETVAL=$? Stop) stop RETVAL=$?;; restart) $0 stop sleep 2 $0 start RETVAL=$?;; reload) $path/sbin/nginx reload RETVAL=$?;; *) echo "USAGE:$0 {start | stop | restart | reload}" esacexit $RETVAL

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report