The Windows version of sc_serv is designed to run on fully updated and patched versions of Windows 2000, XP, Vista and Windows 7.
Linux
Remember to enable the required access on the sc_serv file by doing 'chmod a+x sc_serv' after extracting it from the distribution file otherwise the OS is likely to not run it and show the error message './sc_serv: Permission denied'.
Run as a Daemon
./sc_serv daemon <conf>
<conf> - File path to the configuration file (required in all cases)
If no file / an invalid file is specified then sc_serv will abort loading.
e.g.
./sc_serv daemon ./sc_serv.conf
When run this should output the following:
'sc_serv going daemon with PID [XXXX]' where XXXX is the <pid> of the process.
End a Daemon
kill -SIGTERM <pid> or kill -15 <pid> or kill -s TERM <pid>
<pid> - The PID of the daemon instance (reported when the daemon started or can be found with 'ps ax | grep sc_serv' as long as sc_serv was the file run otherwise you can just use 'ps ax' if the filename isn't known). Additionally the PID of sc_serv is listed in the log file.
Run as a Non-Daemon
./sc_serv <conf>
<conf> - File path to the configuration file (can be relative or absolute)
If no file / an invalid file is specified then sc_serv will abort loading.
Additional Signals
When run on Linux / Mac OS X / BSD then some additional signals are supported to allow for additional control over the running daemon instance of sc_serv.
The following signals can be used with the 'kill' command (in the manner of your choosing for using the kill command) along with the <pid> of the daemon instance to do one of the following actions:
SIGKILL - Stops sc_trans (also SIGTERM, SIGINT and SIGQUIT will work) SIGHUP - Rotates logfile, w3clog and streamw3clog
The result of SIGHUP is that the current log file contents will be moved into <logfile>_1 e.g. sc_serv_1.log, <logfile>_1 will be moved into <logfile>_2 e.g. sc_serv_2.log and so on for all log files which can be found which match the current log file's name. This is useful if timed to have it create day specific log files.
These signals are not supported by the Windows version of sc_serv which will only respond to the Ctrl + C / Ctrl + Break / console close commands the OS provides.
Windows
To run sc_serv with a configuration file in the same folder as the server as the current system user account you would enter into the console:
sc_serv.exe install sc_serv 0 0 sc_serv.conf
Install as a service
sc_serv.exe install <servicename> <username> <password> <conf>
<servicename> - Name of service
Typically enter this as 'sc_serv' though you can use a different name but you will need to remember it as it is required to be the same when using the 'uninstall' mode.
<username> - User under which to run the service as or '0' for the local system
<password> - Password for user or '0' for the local system or with no password
<conf> - File path to the configuration file
If no file / an invalid file is specified then sc_serv will abort loading.
When run as a service there is not a good sense of a current working directory so requires all paths in the configuration and playlist files to be fully qualified otherwise lookups will fail when sc_serv is run.
Windows Note
Please note that the Windows versions of sc_serv are built with a dependency against the Microsoft Visual C++ 2008 SP1 Redistributable Package. If sc_serv is unable to start due to a dependency issue then you will need to install the correct version of the package so it can run which depends on the version of sc_serv you are attempting to run:
32-bit version: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2
64-bit version: http://www.microsoft.com/downloads/en/details.aspx?FamilyID=ba9257ca-337f-4b40-8c14-157cfdffee4e