3 # ices This shell script takes care of starting and stopping
7 # description: Icecast is an Internet audio broadcasting system based on \
8 # MPEG audio technology. Ices is a streamer for icecast.
10 # Source function library.
11 . /etc/rc.d/init.d/functions
13 # Source networking configuration.
14 . /etc/sysconfig/network
16 # Check that networking is up.
17 if is_yes "${NETWORKING}"; then
18 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
26 # Check that ices.conf exists.
27 [ -f /etc/icecast/ices.conf ] || (echo \
28 'There are two config files:
29 /etc/icecast/ices.conf.dist - default config (you must have XML support);
30 /etc/icecast/ices.conf.txt - text config file made for PLD by jack@pld.org.pl
31 After choosing one of them you have to configure it before run and rename
32 to /etc/icecast/ices.conf. Enjoy! Your PLD Team'\
36 # See how we were called.
39 # Check if the service is already running?
40 if [ ! -f /var/lock/subsys/ices ]; then
43 # daemon --user icecast -s /bin/sh 'ices'
44 # Our daemon function doesn't include su's --shell function
45 [ -f /etc/icecast/ices.conf ] && \
46 ICES_CONFIG=`file /etc/icecast/ices.conf|grep XML`
47 if [ ${ICES_CONFIG} = "" ]; then
48 su icecast -s /bin/sh -c 'ices -c /etc/icecast/ices.conf'
50 . /etc/icecast/ices.conf
51 su icecast -s /bin/sh -c "ices ${ICES_OPTIONS}"
54 touch /var/lock/subsys/ices
56 msg_already_running ices
60 if [ ! -f /var/lock/subsys/ices ]; then
63 killproc ices 2> /dev/null
64 rm -f /var/lock/subsys/ices
79 msg_usage "$0 {start|stop|restart|force-reload|status}"