Skip to content

Instantly share code, notes, and snippets.

@tgedikli
Last active August 6, 2022 13:13
Show Gist options
  • Save tgedikli/7d42fee20e112939c0052bcf2ef5aadc to your computer and use it in GitHub Desktop.
Save tgedikli/7d42fee20e112939c0052bcf2ef5aadc to your computer and use it in GitHub Desktop.
A Bash Script that checks PHP FPM is running, if not start FPM Service
status=$(service php7.4-fpm status | grep running)
if [ -z "$status" ]
then
service php7.4-fpm start
else
echo "FPM is running"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment