|
Don't forget that you have to start the server as "root" if you want to use the standart port 80. The dpfTVS needs its configuration file. No way around that. So the only command line parameter it will take is a path for said configuration file. I am no big fan of long command lines. While they are easy to parse they are a mess the moment a single screen line is not enough to hold all the needed information. ./server [configuration file] In case no path is specified dpfTVS will try to open "dpfTVS.cfg" in the current directory. If the server can't open the configuration file it will stop with an according error message. Else it reads the contents and as long as no cruical part is missing it will move itself into demon state after initialising the listening port. To stop it again you have to send a term signal to the process. However, the first term signal will still try to finish all requests currently in progress. Only the listening port is closed for good, then the main process will wait untill all threads are also finished. To stop it right then and there you'd have to send a second "term" signal. It might happen that the listening port you have specified is still busy when you stop and restart the server. In this case it will try to get the port 100 times, sleeping for 1 second in between. If the port can't be bound in this time the server will stop with an according error message. The same will happen if you try to bind a port below 1024 without possessing the proper "root" rights. |