<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>I'm not the most experience Linux user on the block so please excuse me if this is an easy fix.</p>
<p> </p>
<p>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)</p>
<p>I start Icecast2 as a service and it is loaded to do so with chkconfig:<br />-bash-3.2# chkconfig --list icecast<br />icecast 0:off 1:off 2:on 3:on 4:off 5:on 6:off<br /><br /></p>
<p>I'm using a template file I found in my /etc/init.d folder to create the icecast service folder.</p>
<p>#!/bin/sh<br />#<br /># icecast This shell script takes care of starting and stopping<br /># the icecast multimedia streaming systen.<br />#<br /># chkconfig: - 85 15<br /># description: icecast is a multimedia streaming daemon. It is used to \<br /># relay and offer multimedia streaming content.<br /># processname: icecast<br /># pidfile: /var/run/icecast/icecast.pid<br /># config: /usr/local/etc/icecast_cfg.xml<br /><br /># Source function library.<br />. /etc/rc.d/init.d/functions<br /><br />[ -x /usr/local/bin/icecast ] || exit 0<br /><br /># See how we were called.<br />case "$1" in<br /> start)<br /> # Start daemon.<br /> echo -n $"Starting icecast streaming daemon: "<br /> daemon "/usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml > /dev/null"<br /> RETVAL=$?<br /> echo<br /> [ $RETVAL -eq 0 ] && touch /var/lock/subsys/icecast<br /> ;;<br /> stop)<br /> # Stop daemon.<br /> echo -n $"Shutting down icecast streaming daemon: "<br /> killproc icecast<br /> RETVAL=$?<br /> echo<br /> [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/icecast<br /> ;;<br /> status)<br /> status icecast<br /> RETVAL=$?<br /> ;;<br /> restart)<br /> $0 stop<br /> $0 start<br /> ;;<br /> reload)<br /> echo -n $"Reloading icecast: "<br /> killproc icecast -HUP<br /> RETVAL=$?<br /> echo<br /> ;;<br /> condrestart)<br /> [ -f /var/lock/subsys/icecast ] && restart || :<br /> ;;<br /> *)<br /> echo $"Usage: $0 {start|stop|status|restart|reload}"<br /> RETVAL=1<br /> ;;<br />esac<br /><br />exit $RETVAL</p>
<p> </p>
<p>When I run ps aux | icecast I see the following:<br />-bash-3.2# ps aux | grep icecast<br />root 1299 0.0 0.1 7212 820 pts/1 S+ 17:50 0:00 grep icecast<br />nobody 13512 0.0 0.3 64000 2596 ? S May10 0:00 /usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml<br />nobody 17637 0.0 0.3 64160 2704 ? S May09 0:00 /usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml<br />nobody 19837 0.0 0.3 63968 2564 ? S May10 0:00 /usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml<br />nobody 19839 0.0 0.3 63968 2564 ? S May10 0:00 /usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml<br />nobody 28164 0.8 1.1 133648 8792 ? Sl May09 66:12 /usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml<br />nobody 28198 0.0 0.1 59096 1160 ? S May09 0:00 /usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml<br />nobody 28268 0.0 0.2 61584 1644 ? S May09 0:00 /usr/local/bin/icecast -b -c /usr/local/etc/icecast_cfg.xml<br /><br /><br /></p>
<p>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?</p>
<p>Thanks for the help.</p>
<div>
<pre>--
Phil / w2lie
http://www.w2lie.net</pre>
</div>
</body></html>