2022-04-24 13:02:45 +00:00
|
|
|
STOPDAEMON=`which start-stop-daemon`
|
|
|
|
|
2022-04-24 14:26:51 +00:00
|
|
|
if [ "$STOPDAEMON" == "" ]; then
|
|
|
|
if [[ "$STARTSTOPLOCATE" != "" ]]; then
|
|
|
|
STOPDAEMON=$STARTSTOPLOCATE
|
|
|
|
elif [[ -f "/usr/sbin/start-stop-daemon" ]]; then
|
|
|
|
STOPDAEMON=/usr/sbin/start-stop-daemon
|
|
|
|
elif [[ -f "/usr/bin/start-stop-daemon" ]]; then
|
|
|
|
STOPDAEMON=/usr/bin/start-stop-daemon
|
|
|
|
elif [[ -f "/sbin/start-stop-daemon" ]]; then
|
|
|
|
STOPDAEMON=/sbin/start-stop-daemon
|
|
|
|
elif [[ -f "/usr/local/sbin/start-stop-daemon" ]]; then
|
|
|
|
STOPDAEMON=/usr/local/sbin/start-stop-daemon
|
|
|
|
elif [[ -f "/usr/local/bin/start-stop-daemon" ]]; then
|
|
|
|
STOPDAEMON=/usr/local/bin/start-stop-daemon
|
|
|
|
else
|
|
|
|
echo "Script Can't find the location of start-stop-daemon"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo ""
|
|
|
|
fi
|
|
|
|
|
2022-04-24 13:02:45 +00:00
|
|
|
$STOPDAEMON --quiet --stop --retry QUIT/5 --pidfile ~/nginx-settings/run/nginx.pid
|