Skip to content

Instantly share code, notes, and snippets.

@alexjj
Created January 30, 2015 01:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexjj/5348af113c5a28738a80 to your computer and use it in GitHub Desktop.
Save alexjj/5348af113c5a28738a80 to your computer and use it in GitHub Desktop.
PIDFILE=/home/alex/radio.pid
if [ -e "$PIDFILE" ] ; then
PID=`/bin/cat "$PIDFILE"`
if /bin/kill -0 "$PID" > /dev/null 2>&1 ; then
exit 0
fi
fi
/bin/echo "$$" > $PIDFILE
rsync -avhzP --bwlimit=200 -e ssh "wengole:/pool/alex/radio/Today*" /data/music/_radio/
/bin/rm -f "$PIDFILE"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment