Page 1 of 1

minor: subsonic.sh : crontab / SUBSONIC_PIDFILE

PostPosted: Tue Mar 02, 2010 6:57 pm
by nightwalker
I inserted the following code:

Tests to see if subsonic_pidfile is running, otherwise, it will delete the pidfile, and continue with normal start logic.

This also allows you to crontab your subsonic
*/10 * * * * /home/subsonic/subsonic.sh

#################################
cd `dirname $0`
###
if test -r $SUBSONIC_PIDFILE; then
pid=`cat $SUBSONIC_PIDFILE`
if `kill -CHLD $pid >/dev/null 2>&1`; then
exit 0
fi
rm -f $SUBSONIC_PIDFILE
fi
###
${JAVA} -Xmx${SUBSONIC_MAX_MEMORY}m \
#################################