Skip to content

Add --wait-ip option to override systemd initialization to wait for internet full connectivity #3347

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

Closed
Unitech opened this issue Dec 12, 2017 · 1 comment

Comments

@Unitech
Copy link
Owner

Unitech commented Dec 12, 2017

pm2 startup systemd --wait-ip

--wait-ip override the systemd service template to start pm2 once machine get full internet connectivity.

[Unit]
Description=PM2 process manager
Documentation=https://pm2.keymetrics.io/
After=network.target network-online.target
Wants=network-online.target

[Service]
Type=forking                                                                                                                                                                                                        
User=%USER%
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
Environment=PATH=%NODE_PATH%:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
Environment=PM2_HOME=%HOME_PATH%
PIDFile=%HOME_PATH%/pm2.pid

ExecStart=%PM2_PATH% resurrect
ExecReload=%PM2_PATH% reload all
ExecStop=%PM2_PATH% kill

[Install]
WantedBy=multi-user.target network-online.target
@Unitech
Copy link
Owner Author

Unitech commented Dec 14, 2017

Fixed.

Changelog: 2.9.0 CHANGELOG
Introduced in version: 2.9.0

Update procedure:

npm install pm2 -g
pm2 update

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

No branches or pull requests

1 participant