ralyodio / node-startup

Startup script for Linux-based systems for running node app when rebooting using an /etc/init.d script.
MIT License
781 stars 169 forks source link

Start after power loss or system crash #5

Closed netAction closed 8 years ago

netAction commented 10 years ago

The server does not start when stop command has not been executed. --force would not be an option as the server has to start automatically.

ralyodio commented 10 years ago

is there a workable solution for this?

netAction commented 10 years ago

You could search for the running process instead of using the ps file. Or you check if there is a process with the id given in the file. This is the reason the files save the process id.

ralyodio commented 10 years ago

wouldn't the process not be running anymore if the power cord was pulled out of the wall socket?

edit: i think we are moving towards a pid file. lets see if we can find a working solution.

netAction commented 10 years ago

Yes, a pid file and checking the pid on startup when the file already exists should be the best solution.

samlinux commented 10 years ago

Hi, I have one problem after a reboot from the debian 6 system. If the server reboot, it seems my node.js starts but there is no action. To keep it working I have todo following things:

Is there some point which i use take care of ? Thanks for help :+1:

ralyodio commented 9 years ago

@samlinux I think you can use the --force flag now.

https://github.com/chovy/node-startup#force-action

Probably you want start --force