Hi All, I've recently upgraded my hosting to a VPS running CentOS. I'm trying to configure the VPS to launch Icecast as a service so that Icecast starts if the virtual server reboots, or Icecast stops running. I've found several scripts out there to place in my init.d folder, but nothing seems to work for me as of yet. Here is my Icecast2 setup: Location=/usr/local/bin CONF_FILE=/usr/local/etc/icecast.xml Icecast does run fine by itself if I launch it from the command file as ./icecast -b -c /usr/local/etc/icecast.xml Thanks for the help Phil -- -- Phil / w2lie Monitor Long Island, Inc. d/b/a W2LIE.net www.w2lie.net
Could you use a site like pastebin.com to show us what your init script looks like that you've tried? Although the typical init script is certainly more preferable, you could always just append that command you know to be working to /etc/rc.local although you may want to direct stdout and stderr somewhere. On 10/5/10, W2LIE <w2lie at w2lie.net> wrote:> Hi All, > I've recently upgraded my hosting to a VPS running CentOS. > I'm trying to configure the VPS to launch Icecast as a service so that > Icecast starts if the virtual server reboots, or Icecast stops running. > I've found several scripts out there to place in my init.d folder, but > nothing seems to work for me as of yet. > > Here is my Icecast2 setup: > > Location=/usr/local/bin > CONF_FILE=/usr/local/etc/icecast.xml > > Icecast does run fine by itself if I launch it from the command file as > ./icecast -b -c /usr/local/etc/icecast.xml > > Thanks for the help > Phil > > > -- > -- > Phil / w2lie > Monitor Long Island, Inc. > d/b/a W2LIE.net > www.w2lie.net > > > _______________________________________________ > Icecast mailing list > Icecast at xiph.org > http://lists.xiph.org/mailman/listinfo/icecast >
On Wednesday 06 October 2010 00:44:18 Jonathan Nalley wrote:> Could you use a site like pastebin.com to show us what your init > script looks like that you've tried? > > Although the typical init script is certainly more preferable, you > could always just append that command you know to be working to > /etc/rc.local although you may want to direct stdout and stderr > somewhere. >While not necessarily a critical issue, I'd want icecast running as a non-priv user instead of 'root'. Regards, J -- Jeff MacDonald Zoid Technologies: Custom Information Systems http://zoidtechnologies.com/
On 10/05/2010 11:52 PM, W2LIE wrote:> Hi All, > I've recently upgraded my hosting to a VPS running CentOS. > I'm trying to configure the VPS to launch Icecast as a service so that > Icecast starts if the virtual server reboots, or Icecast stops running. > I've found several scripts out there to place in my init.d folder, but > nothing seems to work for me as of yet. > > Here is my Icecast2 setup: > > Location=/usr/local/bin > CONF_FILE=/usr/local/etc/icecast.xml > > Icecast does run fine by itself if I launch it from the command file as > ./icecast -b -c /usr/local/etc/icecast.xmlWhat happens when you run the init script from the command line as root? What happens when you launch the init script with the service command?: service icecast status service icecast start service icecast restart If that works, then you simply need to enable it under system V. (I'm currently running Icecast just fine under RHES5.) john -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/icecast/attachments/20101007/63df4601/attachment.htm
On Thu, 07 Oct 2010 13:36:06 -0400, John List <johnlist at gulfbridge.net> wrote:> > What happens when you run the init script from the command line as root? > > What happens when you launch the init script with the service command?: > > service icecast status > service icecast start > service icecast restart > > > If that works, then you simply need to enable it under system V. > > (I'm currently running Icecast just fine under RHES5.) > > johnJohn and all who replied - Thanks for the help. I've been a bit tied up the last few nights, so I wanted to thank you for helping me. Running service icecast start does not work for me. Here is the error: [/etc/rc.d]# cd init.d [/etc/rc.d/init.d]# service icecast2 status Usage: /etc/init.d/icecast2 {start|stop|restart|reload|force-reload} [/etc/rc.d/init.d]# service icecast2 start Starting icecast2: /etc/init.d/icecast2: line 40: start-stop-daemon: command not found [/etc/rc.d/init.d]# Running icecast2 from the command line as ./icecast works fine. I just can't run it as a service.. This is the code I found. I think it came with the Icecast package when I unzipped the file. This is located in my /etc/rc.d/init.d folder. #! /bin/sh # # icecast2 # # Written by Miquel van Smoorenburg <miquels at cistron.nl>. # Modified for Debian # by Ian Murdock <imurdock at gnu.ai.mit.edu>. # # Further modified by Keegan Quinn <ice at thebasement.org> # for use with Icecast 2 # PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/local/bin/icecast NAME=icecast2 DESC=icecast2 test -x $DAEMON || exit 0 # Defaults CONFIGFILE="/usr/local/etc/icecast.xml" CONFIGDEFAULTFILE="/etc/default/icecast2" USERID=nobody GROUPID=nobody ENABLE="true" # Reads config file (will override defaults above) [ -r "$CONFIGDEFAULTFILE" ] && . $CONFIGDEFAULTFILE if [ "$ENABLE" != "true" ]; then echo "$NAME daemon disabled - read $CONFIGDEFAULTFILE." exit 0 fi 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 <eof> I also have setup in /etc/default/icecast2 # Defaults for icecast2 initscript # sourced by /etc/init.d/icecast2 # installed at /etc/default/icecast2 by the maintainer scripts # # This is a POSIX shell fragment # # Full path to the server configuration file CONFIGFILE="/usr/local/etc/icecast.xml" # Name or ID of the user and group the daemon should run under USERID=nobody GROUPID=nobody # Edit /etc/icecast2/icecast.xml and change at least the passwords. # Change this to true when done to enable the init.d script ENABLE=true <eof> I have in my icecast.xml file: <security> <chroot>0</chroot> <changeowner> <user>nobody</user> <group>nobody</group> </changeowner> </security> Thanks for the help! 73 Phil