Create your own service in Linux

15 12 2010

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

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.