| View previous topic :: View next topic |
| Author |
Message |
Anonymous Guest
|
Posted: Sun Oct 07, 2007 10:17 pm Post subject: cron job to start icecast and liveice |
|
|
| I've set up a cron job every five minutes to start Icecast and Liveice. Obviously, if they are already running, I get an error, but the currently running services keep running. This is exactly what I want...but is there a better way to do this? |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Oct 08, 2007 2:04 am Post subject: |
|
|
Start icecast in a loop within a script with a sleep (to prevent busy looping). icecast terminates for whatever reason and it starts again.
karl. |
|
| Back to top |
|
 |
Anonymous Guest
|
Posted: Mon Oct 08, 2007 3:09 am Post subject: |
|
|
| Huh?...sorry, but that's over my head. |
|
| Back to top |
|
 |
karlH Code Warrior

Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Mon Oct 08, 2007 3:32 am Post subject: |
|
|
Here's a simple version
#!/bin/sh
while [ 1 ]; do
/path/to/icecast -c /path/to/icecast.xml
sleep 2
done
Now it only restarts icecast if the previous icecast has terminated.
karl. |
|
| Back to top |
|
 |
|