Skip to content

Instantly share code, notes, and snippets.

@kkdai
Created December 4, 2014 10:12
#!/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