Skip to content

Instantly share code, notes, and snippets.

@toddp
Created February 9, 2013 19:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toddp/4746771 to your computer and use it in GitHub Desktop.
Save toddp/4746771 to your computer and use it in GitHub Desktop.
/etc/cron.hourly/serviio-watcher.sh
#!/bin/bash
#make-run.sh
#make sure a process is always running.
export DISPLAY=:0 #needed if you are running a simple gui app.
process=serviio.MediaServer
makerun="/home/toddp/dist/serviio-1.1/bin/serviio.sh"
if ps ax | grep -v grep | grep $process > /dev/null
then
exit
else
$makerun &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment