zapty / forever-service

Provision node script as a service via forever, allowing it to automatically start on boot, working across various Linux distros and OS
https://github.com/zapty/forever-service
MIT License
594 stars 65 forks source link

Stopped services should not start on reboot #98

Open geoffsimons opened 6 years ago

geoffsimons commented 6 years ago

I had a recent server instance reboot and from what I can tell, it restarted every service I created with forever-service install. Ideally, if I stop a service, I don't want it to restart unless I manually restart it. If the service was running at the time of reboot, I want it to restart.

geoffsimons commented 6 years ago

Seems like the current answer would be to delete the service, rather than just stopping it. I may end up making start and stop scripts that would install && start and stop && delete, respectively, probably with a short pause between commands. I may also just need to research the command line calls to disable a service on my distro. Bottom line is that I'm not comfortable leaving a service stopped, now that I know it will restart. In my particular case, I had multiple http services, and only the first one could bind to port 80, leaving all the other services in an infinite loop of trying to start and failing. I would say that should stop after some number of retries, but I realize the whole point is to never stop.