-
Notifications
You must be signed in to change notification settings - Fork 197
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 create a Systemd service for start #49
Comments
I took a quick look at this but unfortunately doesn't seem trivial to do. If you want to experiment with this yourself the full cmd that gets run when starting pm2 is:
I actually didn't try systemd but tried to add a crontab and it doesn't seem to work as expected. When you run the cmd manually it works although it breaks pm2 if you try to use For now, this isn't supported and would likely require some rewrites to the prestart.js to pass in the full pm2 path at the very least. I'll have to look at this sometime in the future, but it's very low priority on my list since it's easy enough to start it manually and I typically don't reboot my production machine. If you plan to look at it yourself, let us know if you are successful and I can add a note in the README on how it can be done for those that are interested. |
That looks promising thank you very much for the lead, if I get it working I will report here. Are you using cronjob instead? |
I'm only using crontab for running the sync scripts, not for starting the webserver. I just manually start the webserver after a reboot if need be. It's never been an issue for me. |
what would be the correct method to start "npm run start-pm2" on linux using systemd? Thank you.
The text was updated successfully, but these errors were encountered: