3

I am working on an application and want to make the script start on boot, and for the users to be able to run things like

service my-program restart

What i am seeing is there seems to be different ways between different distro if its upstart, systemV and what ever else is out there. Wanted to know how most people solve this problem is there some special command that will do this regardless of what linux it is. Or am i going to need init scripts for each.

1 Answer 1

0

If you want maximum portability, you may want to ensure your script checks the distro first and then accordingly use the appropriate startup program method

 Pseudocode:

 getDistro ( cat /etc/*release.txt )
 startUp ( Distro )

Good luck

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .