Cron Script to Reshuffle SHOUTcast Playlist

by on Nov.16, 2012, under Linux, Scripts

# Perform kill -USR1 on running sc_trans
# Use in nightly cron to reshuffle "random" playlist
# 20121116 - Jamey Hopkins
# Note: sc_trans accepts the following signals:
# HUP - flush logfiles (close and reopen) -- will make console logging stop
# WINCH - jump to next song
# USR1 - reload playlist off disk (will not interrupt current playing stream)
# USR2 - toggle shuffle on/off
# TERM - normal sc_trans shutdown (clean)
ID=`ps -ef | grep sc_trans | grep -v grep |awk '{ print $2 }'`
if [ "$ID" ]
  echo "Reloading playlist for sc_trans at $ID"
  kill -USR1 $ID
  echo "Did not find a running sc_trans"

No comments for this entry yet...

Leave a Reply

You must be logged in to post a comment.

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

But Wait, There's More!

A few highly recommended friends...