[Icecast] Help: Icecast running multiple times on Cent-OS

Phil - w2lie w2lie at w2lie.net
Mon May 14 21:52:36 UTC 2012


 

I'm not the most experience Linux user on the block so please excuse
me if this is an easy fix. 

I noticed the other day while looking at my
active services that Icecast has started more than once on my server.
I'm wondering if someone would be able to look at my config and tell me
why this is happening, or how to stop this from happening. My guess is
that since I'm binding to an IP, that the first one continues to run,
but the others fail? (assuming here, not looking into logs at this time)


I start Icecast2 as a service and it is loaded to do so with
chkconfig:
-bash-3.2# chkconfig --list icecast
icecast 0:off 1:off 2:on
3:on 4:off 5:on 6:off

I'm using a template file I found in my
/etc/init.d folder to create the icecast service folder. 

#!/bin/sh
#
#
icecast This shell script takes care of starting and stopping
# the
icecast multimedia streaming systen.
#
# chkconfig: - 85 15
#
description: icecast is a multimedia streaming daemon. It is used to 
#
relay and offer multimedia streaming content.
# processname: icecast
#
pidfile: /var/run/icecast/icecast.pid
# config:
/usr/local/etc/icecast_cfg.xml

# Source function library.
.
/etc/rc.d/init.d/functions

[ -x /usr/local/bin/icecast ] || exit 0

#
See how we were called.
case "$1" in
 start)
 # Start daemon.
 echo -n
$"Starting icecast streaming daemon: "
 daemon "/usr/local/bin/icecast
-b -c /usr/local/etc/icecast_cfg.xml > /dev/null"
 RETVAL=$?
 echo
 [
$RETVAL -eq 0 ] && touch /var/lock/subsys/icecast
 ;;
 stop)
 # Stop
daemon.
 echo -n $"Shutting down icecast streaming daemon: "
 killproc
icecast
 RETVAL=$?
 echo
 [ $RETVAL -eq 0 ] && rm -f
/var/lock/subsys/icecast
 ;;
 status)
 status icecast
 RETVAL=$?
 ;;

restart)
 $0 stop
 $0 start
 ;;
 reload)
 echo -n $"Reloading icecast:
"
 killproc icecast -HUP
 RETVAL=$?
 echo
 ;;
 condrestart)
 [ -f
/var/lock/subsys/icecast ] && restart || :
 ;;
 *)
 echo $"Usage: $0
{start|stop|status|restart|reload}"
 RETVAL=1
 ;;
esac

exit $RETVAL


When I run ps aux | icecast I see the following:
-bash-3.2# ps aux |
grep icecast
root 1299 0.0 0.1 7212 820 pts/1 S+ 17:50 0:00 grep
icecast
nobody 13512 0.0 0.3 64000 2596 ? S May10 0:00
/usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml
nobody 17637
0.0 0.3 64160 2704 ? S May09 0:00 /usr/local/bin/icecast -b -c
/usr/local/etc/icecast_cfg.xml
nobody 19837 0.0 0.3 63968 2564 ? S May10
0:00 /usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml
nobody
19839 0.0 0.3 63968 2564 ? S May10 0:00 /usr/local/bin/icecast -b -c
/usr/local/etc/icecast_cfg.xml
nobody 28164 0.8 1.1 133648 8792 ? Sl
May09 66:12 /usr/local/bin/icecast -b -c
/usr/local/etc/icecast_cfg.xml
nobody 28198 0.0 0.1 59096 1160 ? S May09
0:00 /usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml
nobody
28268 0.0 0.2 61584 1644 ? S May09 0:00 /usr/local/bin/icecast -b -c
/usr/local/etc/icecast_cfg.xml

Is this a simple problem of having the
PID commented out on the top of my service script? Isn't having the
/var/lock/subsys enough? 

Thanks for the help. 

-- 
Phil /
w2lie
http://www.w2lie.net
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xiph.org/pipermail/icecast/attachments/20120514/15b2ea2d/attachment.htm>


More information about the Icecast mailing list