{"action":"created","issue":{"url":"https://api.github.com/repos/Unitech/pm2/issues/1035","repository_url":"https://api.github.com/repos/Unitech/pm2","labels_url":"https://api.github.com/repos/Unitech/pm2/issues/1035/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/pm2/issues/1035/comments","events_url":"https://api.github.com/repos/Unitech/pm2/issues/1035/events","html_url":"https://github.com/Unitech/pm2/issues/1035","id":58693955,"number":1035,"title":"PM2 save doesn't seem to be working","user":{"login":"memphisraynz","id":9811720,"avatar_url":"https://avatars.githubusercontent.com/u/9811720?v=3","gravatar_id":"","url":"https://api.github.com/users/memphisraynz","html_url":"https://github.com/memphisraynz","followers_url":"https://api.github.com/users/memphisraynz/followers","following_url":"https://api.github.com/users/memphisraynz/following{/other_user}","gists_url":"https://api.github.com/users/memphisraynz/gists{/gist_id}","starred_url":"https://api.github.com/users/memphisraynz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/memphisraynz/subscriptions","organizations_url":"https://api.github.com/users/memphisraynz/orgs","repos_url":"https://api.github.com/users/memphisraynz/repos","events_url":"https://api.github.com/users/memphisraynz/events{/privacy}","received_events_url":"https://api.github.com/users/memphisraynz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Unitech/pm2/labels/high-priority","name":"high-priority","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":87,"created_at":"2015-02-24T05:01:51Z","updated_at":"2016-06-28T15:33:47Z","closed_at":null,"body":"I am running centos7 and have just installed PM2.\r\nAdded a service \"pm2 start app.js --name lets-chat\" which starts the program and its working fine.\r\nBut after running pm2 startup centos and the pm2 save, upon reboot there is nothing list when I run pm2 list.\r\n\r\nI'm not sure I am doing something wrong or if there is a bug.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/Unitech/pm2/issues/comments/229087210","html_url":"https://github.com/Unitech/pm2/issues/1035#issuecomment-229087210","issue_url":"https://api.github.com/repos/Unitech/pm2/issues/1035","id":229087210,"user":{"login":"boatrite","id":5781611,"avatar_url":"https://avatars.githubusercontent.com/u/5781611?v=3","gravatar_id":"","url":"https://api.github.com/users/boatrite","html_url":"https://github.com/boatrite","followers_url":"https://api.github.com/users/boatrite/followers","following_url":"https://api.github.com/users/boatrite/following{/other_user}","gists_url":"https://api.github.com/users/boatrite/gists{/gist_id}","starred_url":"https://api.github.com/users/boatrite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boatrite/subscriptions","organizations_url":"https://api.github.com/users/boatrite/orgs","repos_url":"https://api.github.com/users/boatrite/repos","events_url":"https://api.github.com/users/boatrite/events{/privacy}","received_events_url":"https://api.github.com/users/boatrite/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T15:33:47Z","updated_at":"2016-06-28T15:33:47Z","body":"Just to throw the solution I found into this massive issue...\r\nI was following the instructions at https://www.digitalocean.com/community/tutorials/how-to-use-pm2-to-setup-a-node-js-production-environment-on-an-ubuntu-vps\r\nand ran `sudo env PATH=$PATH:/opt/node-v4.4.6-linux-x64/bin/ pm2 startup ubuntu -u deploy`.\r\nThis is as the ubuntu user of an Amazon AWS instance, Ubuntu 14.04.\r\n\r\nHowever, this is what was generated at `/etc/init.d/pm2-init.sh` (relevant bit only):\r\n\r\n```\r\nexport PM2_HOME=\"/home/ubuntu/.pm2\"\r\n```\r\n\r\nSo the problem is that `pm2 startup` didn't set PM2_HOME correct, even with specifying the user. After changing PM2_HOME to be correct, everything worked perfectly."}}
{"actor":{"display_login":"boatrite"}}