#!/bin/sh

# check if GiantDisc server is running. Restarts it if necessary
if [ `ps -e | fgrep gdd.pl | fgrep -v fgrep | wc | gawk -- '{print $1}'`  -lt "1" ]
then :
  # gdd.pl is not running - restart it
  #PATH=$PATH:/usr/local/bin:/home/music/bin     This way round it doesnt work on some configurations! 
  PATH=$HOME/bin:/usr/local/bin:$PATH
  export PATH
  /home/music/bin/gdd.pl>/dev/null&
  date > /home/music/tmp/cron.txt
  echo "gdd restarted" >> /home/music/tmp/cron.txt
fi

#printenv >> /home/music/tmp/cron.txt
#


