Skip to content

Instantly share code, notes, and snippets.

@timhberry
Created October 2, 2015 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timhberry/fc53c06fbfce2bba21f5 to your computer and use it in GitHub Desktop.
Save timhberry/fc53c06fbfce2bba21f5 to your computer and use it in GitHub Desktop.
#!/bin/bash
APP=$1
RUNNING=$(dokku ls | grep $APP | awk '{print $4}')
if [ "$RUNNING" == "" ]; then
echo "CRITICAL - $APP does not exist."
exit 2
fi
if [ "$RUNNING" == "stopped" ]; then
echo "WARNING - $APP is stopped"
exit 1
fi
echo "OK - $APP is running."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment