Created
January 23, 2018 10:43
-
-
Save checkaayush/e58d7d260025b4337033b2800a62e365 to your computer and use it in GitHub Desktop.
PM2 systemd script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=PM2 process manager | |
Documentation=https://pm2.keymetrics.io/ | |
After=network.target | |
[Service] | |
Type=forking | |
User=ubuntu | |
LimitNOFILE=infinity | |
LimitNPROC=infinity | |
LimitCORE=infinity | |
Environment=PATH=/usr/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin | |
Environment=PM2_HOME=/home/ubuntu/.pm2 | |
PIDFile=/home/ubuntu/.pm2/pm2.pid | |
ExecStart=/usr/lib/node_modules/pm2/bin/pm2 resurrect | |
ExecReload=/usr/lib/node_modules/pm2/bin/pm2 reload all | |
ExecStop=/usr/lib/node_modules/pm2/bin/pm2 kill | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment