Skip to content

Instantly share code, notes, and snippets.

@bitmorse
Created March 13, 2016 15:57
Show Gist options
  • Save bitmorse/4300f73c16d83c7b7657 to your computer and use it in GitHub Desktop.
Save bitmorse/4300f73c16d83c7b7657 to your computer and use it in GitHub Desktop.
new_zim_run_for_monit
#!/bin/bash
PIDFILE=/var/run/zim_run.pid
case $1 in
start)
/usr/bin/python /home/pi/zim/mapa.py >/home/pi/log &
echo $! > ${PIDFILE};
;;
stop)
kill `cat ${PIDFILE}` ;;
*)
echo "usage: zim_run {start|stop}" ;;
esac
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment