Reputation: 157
Please I made a NodeJs application and put it on the start of ubuntu server like a service.
In my command which start nodeJs automaticaly is:
cd /var/www/node
node server.js
The problem now is that my command doesn't start like daemon
and on he boot it prevents all other services.Now,all other services cannot start after the execution of this command and I have not access for my login.
Please how to skip or stop the automatic execution of the script of my nodeJS and get access to my server in order to modify the problem?
Thanks to all of you
Upvotes: 0
Views: 84
Reputation: 141819
To regain access you'll have to either log in without that script or modify it. If your server has a way to boot into a minimal mode, you may be able to log in and edit the script. Otherwise to edit it, y could mount the hard drive to another machine, update the script, and then moving the hard drive back. You can modify it to run in the background like this:
nohup node server.js > /dev/null &
If you want the output to go to a log file instead of /dev/null, you can just specify that there:
nohup node server.js > /var/www/server.log &
Upvotes: 1