Hello.
Which are the steps to create a daemon process?. I already have the program running in background but I want to “register” it as a service to make easier its invocation with the “service” command.
What are you planning on getting out of it being “registered”? If you
use the template which is ‘/etc/init.d/skeleton’ and then use something
like ‘chkconfig <serviceName> on’ it’ll all be magically available in
Yast should you decide to use that option. I don’t think there is much
to “registration” really.
Good luck.
castord wrote:
> Hello.
> Which are the steps to create a daemon process?. I already have the
> program running in background but I want to “register” it as a service
> to make easier its invocation with the “service” command.
>
> Something like this:
> service myserv start
>
> Thanks in advance
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
service is just a script that does the equivalent of
/etc/init.d/somescript action
when you type
service somescript action
I actually prefer
rcsomescript action
which is a symlink to /etc/init.d/somescript, as you can use bash command completion. service is a RedHatism.
As ab says, there is no “registration”. You just have to write the script abd put in /etc/init.d/ and to use chkconfig to make the symlinks in the relevant runlevel directories.
Hi, I think you may find the following openSuSE informational on init scripts packaging standards very helpful and should point you in the right direction, and ab’s post above also has some good information. From the page: