Information Technology News
Write your own Linux server part two | Write your own Linux server part two |
|
| by David M Williams | |
| Tuesday, 21 August 2007 | |
|
Page 2 of 4 Security and debugging
Featured Whitepaper
5 Best Practices for Smartphone Support
To provide some further security, the server does not return any messages to the client apart from error messages and output of requests to return all the e-mail aliases or groups for a given login ID. This is unlike more chatty protocols like SMTP which even provides help! Despite being so mute, to aid in debugging, a log file can be switched on which will track all connections made and commands issued. A command-line flag can turn this on, but the best way is described in the following section. Launching the daemon at system startup
A script, 99dwsvr, is included which can be placed in the /etc/rc2.d directory hierarchy. In this directory one finds shell programs that set server processes running at startup - just like ours. The programs also terminate server processes when the system is shutting down or changing run-level. The scripts all work in a consistent fashion - giving them a parameter of start starts the process; giving a parameter of stop stops the process. Our shell script does just this. It also lets some important flags be set easily, such as the port number, and whether to turn logging on or not. DWSERV_DIR=.
# Edit the following to change the port number that dwserv
# Edit the following to increase or decrease the connection queue. This
# Turn on or off logging - use 'on' or 'off'
# Edit the following to specify where the logfile is to be stored - this
# Edit the following to specify if verbose logging should be performed.
# ./99dwsvr start dwserv running # ./99dwsvr stop dwserv stopped
|
| < Next story in category | Previous story in the category > |
|---|






