stop-php-fpm: no error if FPM pid was not found
This commit is contained in:
parent
cf992e8d8d
commit
b620ff03e1
@ -1,8 +1,9 @@
|
||||
#!/bin/bash
|
||||
|
||||
PID=$(cat /run/php-fpm/php-fpm.pid)
|
||||
PID=$(cat /run/php-fpm/php-fpm.pid 2>/dev/null)
|
||||
[ "$PID" == "" ] && exit 0
|
||||
CHILDREN=$(ps -o pid --no-headers --ppid "$PID" | wc -l)
|
||||
|
||||
if [ $CHILDREN == "0" ]; then
|
||||
if [ "$CHILDREN" == "0" ]; then
|
||||
kill "$PID"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user