# put this in /usr/local/bin/shoutcast

=================================
#!/bin/bash
#########################
# Start Shoutcast Wrapper
#########################
/usr/local/bin/sc_serv /etc/sc_serv.conf > /dev/null &




===================================
# put this in /etc/init.d/shoutcast
===================================

#! /bin/sh
#
# shoutcast
#
#               Written by Miquel van Smoorenburg <miquels@cistron.nl>.
#               Modified for Debian 
#               by Ian Murdock <imurdock@gnu.ai.mit.edu>.
#

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/local/bin/shoutcast
NAME=shoutcast
DESC=shoutcast

test -x $DAEMON || exit 0

# Defaults
CONFIGFILE="/sc_serv.conf"
USERID=root
GROUPID=root


set -e

case "$1" in
  start)
        echo -n "Starting $DESC: "
        start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
                --exec $DAEMON -- -b -c $CONFIGFILE
        echo "$NAME."
        ;;
  stop)
        echo -n "Stopping $DESC: "
        start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
        echo "$NAME."
        ;;
  reload|force-reload)
        echo "Reloading $DESC configuration files."
        start-stop-daemon --stop --signal 1 --quiet --exec $DAEMON
        ;;
  restart)
        echo -n "Restarting $DESC: "
        start-stop-daemon --stop --oknodo --quiet --exec $DAEMON
        sleep 1
        start-stop-daemon --start --quiet --chuid $USERID:$GROUPID \
                --exec $DAEMON -- -b -c $CONFIGFILE
        echo "$NAME."
        ;;
  *)
        echo "Usage: $0 {start|stop|restart|reload|force-reload}" >&2
        exit 1
        ;;
esac

exit 0

=================================

update-rc.d shoutcast defaults 20 21

================================

