Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to restart service? #81

Open
ngohuunam opened this issue Oct 29, 2016 · 9 comments
Open

How to restart service? #81

ngohuunam opened this issue Oct 29, 2016 · 9 comments

Comments

@ngohuunam
Copy link

How to stop and start nodejs.js file again, in case of modify nodejs.js file?

Thks

@arvind-agarwal
Copy link
Contributor

You can use the start and stop service commands, the nodejs files can be changed any number of times since everytime service starts it uses the latest script file found in the same location.

@ngohuunam
Copy link
Author

is it
$ sudo forever-service stop test
than
$ sudo forever-service start test
?
sorry for my bad

@arvind-agarwal
Copy link
Contributor

when you install the service you will get exact commands in console that time, usually it would be sudo service servicename start / stop

@ngohuunam
Copy link
Author

Sorry I tried some times, but unfortunatly, it did't work, totally because my zero knowledge about linux, could you please teach me step by step? my service name: mynode. How I can stop and start again service to run newest nodejs file?
thanks

@yogeshwar607
Copy link

@ngohuunam , you can use following commands for your case.
sudo service mynode start
sudo service mynode stop
sudo service mynode restart
sudo service mynode status

@arvind-agarwal
Copy link
Contributor

@jm93 forever service is primarily designed to provision service for a given platform. The commands to control service are specific to a platform and not generic. When you provision a service using forever-service these commands are clearly displayed.

@jm93
Copy link

jm93 commented Dec 3, 2016

thanks for getting back

so I tried:
sudo forever-service install test --script server.js --start

and looks like it worked, I can get it from sudo forever list.

I'll delete my last comment if I can

@vikas0121
Copy link

Hi, i'm deploying the rocket chat application and want to use secondary MongoDB to read.
while setting the MONGOURL in the forever service
export MONGO_URL=mongodb://10.xx.xx.xxx:27017,10.xx.xx.xxx:27017/Chat?replicaSet=rs1&readPreference=nearest
not working for me..help needed
This is a Meteor.js application.

@arvind-agarwal
Copy link
Contributor

arvind-agarwal commented Oct 8, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants