Skip to content

Instantly share code, notes, and snippets.

@kkdai
Created December 4, 2014 10:12
Show Gist options
  • Save kkdai/e42fe2dff9b033b385a0 to your computer and use it in GitHub Desktop.
Save kkdai/e42fe2dff9b033b385a0 to your computer and use it in GitHub Desktop.
#!/bin/sh
COMMAND_PROG=/home/PROG1
if [ ! `pidof ${COMMAND_PROG}` ]; then
date +"%Y/%m/%d %H:%M:%S-PROG1 missing.. trying to resart service"
service PROG1 restart
date +"%Y/%m/%d %H:%M:%S-Restart completed"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment