Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion sapi/fpm/init.d.php-fpm.in
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,20 @@ case "$1" in
fi
;;

status)
if [ ! -r $php_fpm_PID ] ; then
echo "php-fpm is stopped"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"not running" would be better

exit 0
fi

PID=`cat $php_fpm_PID`
if ps -p $PID | grep -q $PID; then
echo "php-fpm (pid $PID) is running..."
else
echo "php-fpm dead but pid file exists"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"not running" would be better than "dead"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The phrases were taken from RHEL/Centos lsb messages to be aligned with other daemons.

fi
;;

force-quit)
echo -n "Terminating php-fpm "

Expand Down Expand Up @@ -131,7 +145,7 @@ case "$1" in
;;

*)
echo "Usage: $0 {start|stop|force-quit|restart|reload}"
echo "Usage: $0 {start|stop|force-quit|restart|reload|status}"
exit 1
;;

Expand Down