Created
May 16, 2015 12:50
-
-
Save tareqy/99886170852e31a6139a to your computer and use it in GitHub Desktop.
Restarted Beanstalkd if not running, and add to log.
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 | |
case "$(pidof beanstalkd | wc -w)" in | |
0) echo "Restarting beanstalkd: $(date)" >> /var/log/beanstalkd.log | |
/etc/rc.d/init.d/beanstalkd restart | |
;; | |
1) # all ok | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment