Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- SERVICE_IRC='Unreal3.2'
- SERVICE_ANOPE='services'
- SERVICE_FENRIR='Fenrir.conf'
- if ps ax | grep -v grep |grep $SERVICE_IRC > /dev/null
- then
- # echo "`date +%H:%M` $SERVICE_IRC running. OK!"
- echo "Unreal3.2 OK" >> /dev/null
- else
- echo "`date +%H:%M` $SERVICE_IRC is not running! Attempting to start!"
- sh /home/simon/Unreal3.2/unreal start
- echo "`date +%H:%M` $SERVICE_IRC is not running! Attempted to start, please check to make sure $SERVICE_IRC is running!" | mailx -s "`date +%H:%M` $SERVICE_IRC down!" sphilipp10@gmail.com
- fi
- if ps ax | grep -v grep |grep $SERVICE_ANOPE > /dev/null
- then
- # echo "`date +%H:%M` $SERVICE_ANOPE running. OK!"
- echo "Anope OK" >> /dev/null
- else
- echo "`date +%H:%M` $SERVICE_ANOPE is not running! Attempting to start!"
- # This results in syntax errors when run like this
- # sh /home/simon/anope/services
- echo "`date +%H:%M` $SERVICE_ANOPE is not running! Attempted to start, please check to make sure $SERVICE_ANOPE is running!" | mailx -s "`date +%H:%M` $SERVICE_ANOPE down!" sphilipp10@gmail.com
- fi
- if ps ax | grep -v grep |grep $SERVICE_FENRIR > /dev/null
- then
- # echo "`date +%H:%M` $SERVICE_FENRIR running. OK!"
- echo "Fenrir OK" >> /dev/null
- else
- echo "`date +%H:%M` $SERVICE_FENRIR is not running! Attempting to start!"
- # This results in syntax errors when run like this
- # sh /home/simon/eggdrop/Fenrir.conf
- echo "`date +%H:%M` $SERVICE_FENRIR is not running! Attempted to start, please check to make sure $SERVICE_IRC is running!" | mailx -s "`date +%H:%M` $SERVICE_FENRIR down!" sphilipp10@gmail.com
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement