Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # Init script for SHOUTcast
- # by caraoge, modified to work correctly by Thomas R Bailey
- # Last edited Sept 3 2009
- # Set config to config file location
- # set daemon to sc_serv location
- ################################################## ##########################
- ## CHANGE THESE VALUES to match your setup
- ## CONFIG is the fully qualified location of your config file
- ## DAEMON is the fully qualified location of the sc_serv binary
- ## Note, the script will look for sc_serv and sc_serv.conf in /usr/lib/shout
- ################################################## ##########################
- CONFIG="/root/shoutcastVampires/sc_serv.conf"
- DAEMON="/root/shoutcastVampires/sc_serv4"
- ############# Don't fiddle below this line ##############
- # Check for SHOUTcast binary
- test -f $DAEMON || exit 0
- # The init commands
- case "$1" in
- start)
- echo "Starting SHOUTcast server..."
- $DAEMON $CONFIG > /dev/null 2>&1 &
- ;;
- stop)
- echo "Stopping SHOUTcast server..."
- kill -9 `ps -C sc_serv4 -o pid --no-headers`
- ;;
- restart)
- echo "Stopping SHOUTcast server..."
- kill -9 `ps -C sc_serv4 -o pid --no-headers`
- echo "Starting SHOUTcast server..."
- $DAEMON $CONFIG > /dev/null 2>&1 &
- ;;
- *)
- echo "usage: /etc/init.d/shoutcast"
- echo "$0 {start | stop | restart}"
- exit 1
- ;;
- esac
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement