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?!
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.