How to custom create a service
Hi.
I have a script file that I need to run as a service or sorts. Right now I can run it then just kill the pid when I want to shut it off. Id prefer a way to make it a service so I can type, for example: service myservice stop -to stop the service, and service myservice start - to start it. Can anyone tell me how to do this? Or if theres a better way, please let me know. Thanks again! :jawa: |
this is what bash scripting is for.........you make 2 scripts, one turns the service on, the other to turn it off, and execute like so.......
Code:
./service_on |
If you want the standard redhat-like service command, look in /etc/init.d (most likely) at some of the scripts there and copy one for your own use and your command.
|
All times are GMT -5. The time now is 01:57 AM. |