If reporting a bug, please use the following template.
Running the following command should produce a startup script:
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup centos ecosystem.json -u nodeadmin --hp /home/nodeadmin"
The command fails as follows:
[PM2] Writing init configuration in /etc/systemd/system/pm2.service
[PM2][ERROR] Failure when trying to write startup script
Run the command below on CentOS 6.x
sudo su -c "env PATH=$PATH:/usr/bin pm2 startup centos ecosystem.json -u nodeadmin --hp /home/nodeadmin"
OS : CentOS 6 (I'm not sure of the minor release (6.8 I think) but can get it if necessary)
node.js : 6.9.2
PM2 : @latest (2.2.1)
Use the command: tail --lines 50 ~/.pm2/pm2.log
(Unavailable at the moment)
...
```
cf CONTRIBUTING.md for more informations
Centos 6 use SystemV, it should work using pm2 startup systemv.
To clarify, the documentation pointed to by the Release 2.2.1 notes says
SystemD: Ubuntu >= 16, CentOS, Arch, Debian >= 7
Could you verify that we should 'systemv' please? In the doc below 'systemd' is listed twice. Is one of those supposed to be 'systemv'?
I don't have access to the server and have to instruct others, so I can't test for myself.
Also, we have RedHat servers as well. Is 'redhat' still supported? Should I worry? :-)
Thanks for a great product.
Just run pm2 startup if you dont know which platform to use.
Most helpful comment
Just run
pm2 startupif you dont know which platform to use.