Created
May 16, 2012 20:58
Monit wrapper script that start/stops a process that doesn't use a pid
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
#!/usr/bin/env bash | |
case $1 in | |
start) | |
PID=$(start statsd | awk '{print $4}'); | |
echo $PID > /var/run/statsd.pid; | |
;; | |
stop) | |
kill `cat /var/run/statsd.pid` ;; | |
*) | |
echo "usage: statsd_wrapper {start|stop}" ;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment