Skip to content

Instantly share code, notes, and snippets.

@bhcopeland
Created December 12, 2013 21:15
Show Gist options
  • Save bhcopeland/7935584 to your computer and use it in GitHub Desktop.
Save bhcopeland/7935584 to your computer and use it in GitHub Desktop.
is whatpulse running - crontab script to start whatpulse when it dies
#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
export DISPLAY=:0.0
export DISPLAY=:0
RESULT=`ps -A | sed -n /whatpulse/p`
if [ "${RESULT:-null}" = null ]; then
echo "whatpulse not running "
#xmessage "whatpulse not running"
zenity --error --text 'whatpulse not running' --display=:0.0
#/home/ben/.whatpulse-bin/whatpulse
/home/ben/.whatpulse-bin/startwhatpulse
else
echo "whatpulse running"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment