33 lines
532 B
Desktop File
Executable File
33 lines
532 B
Desktop File
Executable File
#!/bin/sh
|
|
|
|
#--- import colors and init-funcs ---
|
|
. /usr/lib/init/colors.sh
|
|
. /usr/lib/init/init-funcs.sh
|
|
#------------------------------------
|
|
|
|
start() {
|
|
notify "Starting nginx"
|
|
nginx
|
|
check $? "start nginx"
|
|
echo $(pgrep nginx) > /var/run/nginx.pid
|
|
return $?
|
|
}
|
|
|
|
stop() {
|
|
notify "Stopping nginx"
|
|
nginx -s stop
|
|
check $? "stop nginx"
|
|
rm /var/run/nginx.pid &> /dev/null
|
|
return $?
|
|
}
|
|
|
|
case "$1" in
|
|
start|stop|restart|reload)
|
|
"$1"
|
|
;;
|
|
*)
|
|
help
|
|
;;
|
|
esac
|
|
return $?
|