Without the fix, when you start the server from a command line, you do not get a prompt back until you press enter. Also, you do not get a [ ok ] notification. This small one-line patch will fix both of these issues. Standard diff (-Naru) is included in the Additional Information. Reproducible: Always Steps to Reproduce: 1. open a shell that can control the start/stop status of shoutcast 2. /etc/init.d/shoutcast stop #if it is running 3. /etc/init.d/shoutcast start Actual Results: Does not display [ ok ] and does not return back to the prompt. root /etc # /etc/init.d/shoutcast start * Starting Shoutcast Server ... ******************************************************************************* ** SHOUTcast Distributed Network Audio Server ** Copyright (C) 1998-2004 Nullsoft, Inc. All Rights Reserved. ** Use "sc_serv filename.ini" to specify an ini file. ******************************************************************************* [ Expected Results: Should display [ ok ] and return back to the prompt. root /etc # /etc/init.d/shoutcast start * Starting Shoutcast Server ... ******************************************************************************* ** SHOUTcast Distributed Network Audio Server ** Copyright (C) 1998-2004 Nullsoft, Inc. All Rights Reserved. ** Use "sc_serv filename.ini" to specify an ini file. ******************************************************************************* [ ok ] root /etc/init.d # echo yay --- old/shoutcast 2007-02-04 13:31:39.000000000 -0700 +++ shoutcast 2007-02-04 13:30:03.000000000 -0700 @@ -21,6 +21,7 @@ ebegin "Starting Shoutcast Server" start-stop-daemon --start --quiet --exec /opt/shoutcast/sc_serv /etc/shoutcast/sc_serv.conf & + sleep 0.1 eend $? }
There is imho another (serious?) issue. Why the heck is sc_trans_linux+sc_serv running as user root? Is there any good reason, why a closed source program should run that way on my server?
Well, you can easily help yourself. Just add --chuid ${you_favorite_user_here} to that start() function in /etc/init.d/shoutcast*, after you created that unix user, of course. Don't forget to chmod your shoutcast/shoutcast_trans config file(s). --------- snip here ----------- #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 shoucast_user=${your_favorite_user_here} ... start() { checkconfig || return 1 ebegin "Starting Shoutcast Trans" start-stop-daemon --start --quiet \ --chuid ${shoutcast_user} -m --pidfile /var/run/shoutcast_trans.pid \ --exec /opt/shoutcast/sc_trans_linux /etc/shoutcast/sc_trans.conf >/dev/null & sleep 0.1 eend $? } ... --------- snip here ----------- I hope someone could change this in future ebuilds, again, it's no good to run a (networking!) daemon as root per default.
Hm, It should be "shoutcast_user", of course.
(In reply to comment #1) > There is imho another (serious?) issue. > Why the heck is sc_trans_linux+sc_serv running as user root? > Is there any good reason, why a closed source program > should run that way on my server? > Indeed. I'll try to get this fixed tomorrow, can't have binary junk running as root...
+ 22 Jul 2009; Samuli Suominen <ssuominen@gentoo.org> + +files/1.9.8-sc_serv.conf.patch, +shoutcast-server-bin-1.9.8-r1.ebuild, + +files/shoutcast.2: + Don't run as root wrt #165331. Should also fix the minor "Display" bug this bug was original for; please try.