Created
August 21, 2018 13:39
-
-
Save felipekm/2f75ce385e9acf1ec7dd66622b7352fa to your computer and use it in GitHub Desktop.
Validates if a PM2 process is running
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sudo pm2 describe login > /dev/null | |
RUNNING=$? | |
if [ "${RUNNING}" -ne 0 ]; then | |
echo "not running" | |
else | |
echo "is running" | |
fi; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment