while [ "${pid}" -ne 0 ]
do
# get parent process id
- pid=`cut -d ' ' -f 4 "/proc/${pid}/stat"`
+ pid=$(cut -d ' ' -f 4 "/proc/${pid}/stat")
[ "${pid}" -eq 0 ] && break
# check if client connection
done
# get all server pids that should be ignored
- for server in `cat /var/run/${NAME}.*.pid`
+ for server in $(cat /var/run/${NAME}.*.pid)
do
append ignore "${server}"
done
# get all running pids and kill client connections
local skip
- for pid in `pidof "${NAME}"`
+ for pid in $(pidof "${NAME}")
do
# check if correct program, otherwise process next pid
grep -F -q -e "${PROG}" "/proc/${pid}/cmdline" || {