Daemon sample

Hi guys,
I made a program in c++ running like a daemon, but now I need to manage the service, like service myService start/stop/restart, in Java I did it easily but in c++ I'm not founding nothing to help me.

I now that what manage it is just a bash file, so may anyone show me some bash sample?!

Thanks so much.
Last edited on
All that is typically done in the init shell script. Except for becoming a deamon process itself (which you can test without an init script) the integration with the "service" command is done with a POSIX shell script. Look at the scripts in /etc/init.d for guidance.

http://www.linux.com/archive/feed/46892
Topic archived. No new replies allowed.