mirror of
https://github.com/bol-van/zapret.git
synced 2025-12-26 01:18:13 +03:00
old dash compat
This commit is contained in:
@@ -25,7 +25,7 @@ run_daemon()
|
||||
# $2 - daemon
|
||||
# $3 - daemon args
|
||||
# use $PIDDIR/$DAEMONBASE$1.pid as pidfile
|
||||
local DAEMONBASE="$(basename $2)"
|
||||
local DAEMONBASE="$(basename "$2")"
|
||||
local PIDFILE="$PIDDIR/$DAEMONBASE$1.pid"
|
||||
local ARGS="--daemon --pidfile=$PIDFILE $3"
|
||||
[ -f "$PIDFILE" ] && pgrep -qF "$PIDFILE" && {
|
||||
@@ -42,7 +42,7 @@ stop_daemon()
|
||||
# use $PIDDIR/$DAEMONBASE$1.pid as pidfile
|
||||
|
||||
local PID
|
||||
local DAEMONBASE="$(basename $2)"
|
||||
local DAEMONBASE="$(basename "$2")"
|
||||
local PIDFILE="$PIDDIR/$DAEMONBASE$1.pid"
|
||||
[ -f "$PIDFILE" ] && read PID <"$PIDFILE"
|
||||
[ -n "$PID" ] && {
|
||||
|
||||
@@ -56,7 +56,7 @@ run_daemon()
|
||||
# $2 - daemon
|
||||
# $3 - daemon args
|
||||
# use $PIDDIR/$DAEMONBASE$1.pid as pidfile
|
||||
local DAEMONBASE=$(basename $2)
|
||||
local DAEMONBASE="$(basename "$2")"
|
||||
echo "Starting daemon $1: $2 $3"
|
||||
procd_open_instance
|
||||
procd_set_param command $2 $3
|
||||
|
||||
@@ -166,7 +166,7 @@ run_daemon()
|
||||
# $3 - daemon args
|
||||
# use $PIDDIR/$DAEMONBASE$1.pid as pidfile
|
||||
|
||||
local DAEMONBASE=$(basename $2)
|
||||
local DAEMONBASE="$(basename "$2")"
|
||||
local PIDFILE=$PIDDIR/$DAEMONBASE$1.pid
|
||||
echo "Starting daemon $1: $2 $3"
|
||||
if exists start-stop-daemon ; then
|
||||
@@ -191,7 +191,7 @@ stop_daemon()
|
||||
# $1 - daemon number : 1,2,3,...
|
||||
# $2 - daemon
|
||||
# use $PIDDIR/$DAEMONBASE$1.pid as pidfile
|
||||
local DAEMONBASE=$(basename $2)
|
||||
local DAEMONBASE="$(basename "$2")"
|
||||
local PIDFILE=$PIDDIR/$DAEMONBASE$1.pid
|
||||
echo "Stopping daemon $1: $2"
|
||||
if exists start-stop-daemon ; then
|
||||
|
||||
Reference in New Issue
Block a user