Write a script & put it in /etc/init.d (see other scripts there for examples - the script should accept a parameter of start and stop).
NB: ensure it has execute permissions!
Then, link this to /etc/rc3.d so that it starts when you go to init level 3 (usual place for network-type stuff)
(assuming your script is called shoutcast)
Choose a numerical value (S99/K99) so that your script is run at the appropriate point (startups are procesed in numerical order).
i've already tried something like this... the problem is that the server has a output on the screen that is updated every second and so the system stops there.
I had to log in in the single-user-mode to remove the file...
yes, the file runs but it doesn't retun to the prompt!
i've tried it to send the output to a file, but the file is updated every second, too.
an output example:
*******************************************************************************
** SHOUTcast Distributed Network Audio Server
** Copyright (C) 1998-2000 Nullsoft, Inc. All Rights Reserved.
** Use "sc_serv filename.ini" to specify an ini file.
*******************************************************************************
Event log:
<01/31/02@19:27:36> [SHOUTcast] DNAS/SolarisSparc v1.8.3 (Aug 7 2001) starting up...
<01/31/02@19:27:36> [main] pid: 660
<01/31/02@19:27:36> [main] loaded config from sc_serv.conf
<01/31/02@19:27:36> [main] initializing (usermax:32 portbase:7777)...
<01/31/02@19:27:36> [main] No ban file found (sc_serv.ban)
<01/31/02@19:27:36> [main] No rip file found (sc_serv.rip)
<01/31/02@19:27:36> [main] opening source socket
<01/31/02@19:27:36> [main] source thread starting
<01/31/02@19:27:36> [main] opening client socket
<01/31/02@19:27:36> [main] Client Stream thread [0] starting
<01/31/02@19:27:36> [main] client main thread starting
<01/31/02@19:27:36> [source] listening for connection on port 7778
<01/31/02@19:27:36> [main] SIGWINCH; Reloaded Config File
<01/31/02@19:27:59> 0 listeners (0 unique)
Well, having had a quick look at the Shoutcast FAQ, it looks like it's intended to write to the console all the time - with an optional log file as well.
So, in your startup script, have you got something like this :-
This should stop it writing to the console & should(!) let the script finish & return you to the prompt.
If this works & you then want to see the shoutcast messages on your screen, just run tail -f /path/shoutcast.logOne by one, the penguins steal my sanity. X-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.