If you wish to create your service daemon in linux box, try the following tips:
1) The existing services are managed by shell scripts located in /etc/init.d directory. You can use any of this as a template file to build a service script.
2) You may notice “case” blocks in the script to handle start/stop/restart/status operations.
For Eg:
case "$1" in
start)
echo -n $"Starting name: "
echo
echo
;;
The above block will be executed when somebody try
$service start
command. Similarly you can put “stop” or “restart” blocks as well.
You can download this template file start building !!
Advertisement

Recent Comments