9 lines
156 B
Plaintext
9 lines
156 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
PID=$(cat /run/php-fpm/php-fpm.pid)
|
||
|
CHILDREN=$(ps -o pid --no-headers --ppid "$PID" | wc -l)
|
||
|
|
||
|
if [ $CHILDREN == "0" ]; then
|
||
|
kill "$PID"
|
||
|
fi
|