Skip to content

Instantly share code, notes, and snippets.

@bitmorse
Created March 13, 2016 15:57
Show Gist options
  • Select an option

  • Save bitmorse/4300f73c16d83c7b7657 to your computer and use it in GitHub Desktop.

Select an option

Save bitmorse/4300f73c16d83c7b7657 to your computer and use it in GitHub Desktop.

Revisions

  1. bitmorse created this gist Mar 13, 2016.
    14 changes: 14 additions & 0 deletions untitled
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/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