Server IP : 144.76.124.212 / Your IP : 216.73.216.94 Web Server : LiteSpeed System : Linux l4cp.vnetindia.com 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64 User : rakcha ( 1356) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/cpguard/cpg-nginx/ |
Upload File : |
#!/bin/sh # # Source function library. #. /etc/rc.d/init.d/functions # Source networking configuration. #. /etc/sysconfig/network nginx="/opt/cpguard/cpg-nginx/sbin/nginx" prog=$nginx lockfile="/opt/cpguard/cpg-nginx/nginx.lock" pidfile="/opt/cpguard/cpg-nginx/nginx.pid" NGINX_CONF_FILE="/opt/cpguard/cpg-nginx/conf/nginx.conf" start() { [ -x $nginx ] || exit 5 [ -f $NGINX_CONF_FILE ] || exit 6 echo -n $"Starting $prog: " $nginx -c $NGINX_CONF_FILE retval=$? echo [ $retval -eq 0 ] && touch $lockfile return $retval } stop() { echo -n $"Stopping $prog: " kill -9 `ps aux | grep 'nginx:' | grep cpguard | tr -s " " | cut -d " " -f 2` retval=$? echo [ $retval -eq 0 ] && rm -f $lockfile return $retval } restart() { stop start } case "$1" in start) $1 ;; stop) $1 ;; restart) $1 ;; *) echo $"Usage: $0 {start|stop|restart}" exit 2 esac