{"action":"opened","issue":{"url":"https://api.github.com/repos/Unitech/PM2/issues/933","labels_url":"https://api.github.com/repos/Unitech/PM2/issues/933/labels{/name}","comments_url":"https://api.github.com/repos/Unitech/PM2/issues/933/comments","events_url":"https://api.github.com/repos/Unitech/PM2/issues/933/events","html_url":"https://github.com/Unitech/PM2/issues/933","id":53989995,"number":933,"title":"Installation of startup script kicks of pm2 daemon running as root","user":{"login":"akloeber","id":968308,"avatar_url":"https://avatars.githubusercontent.com/u/968308?v=3","gravatar_id":"","url":"https://api.github.com/users/akloeber","html_url":"https://github.com/akloeber","followers_url":"https://api.github.com/users/akloeber/followers","following_url":"https://api.github.com/users/akloeber/following{/other_user}","gists_url":"https://api.github.com/users/akloeber/gists{/gist_id}","starred_url":"https://api.github.com/users/akloeber/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akloeber/subscriptions","organizations_url":"https://api.github.com/users/akloeber/orgs","repos_url":"https://api.github.com/users/akloeber/repos","events_url":"https://api.github.com/users/akloeber/events{/privacy}","received_events_url":"https://api.github.com/users/akloeber/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-11T12:08:51Z","updated_at":"2015-01-11T12:08:51Z","closed_at":null,"body":"After creation of the startup script and its registration as a service as root via\r\n\r\n    # pm2 startup ubuntu -u <USER>\r\n\r\nthere is a pm2 instance running as root afterwards and a working directory is created at `/root/.pm2`.\r\n\r\nThis does not make sense in this case where the user is explicitely given. Either the daemon user should match the given user `<USER>` or the daemon should not be started at all if the startup command is only meant to register the service.\r\n\r\nAs a workaround `pm2 startup ubuntu -u <USER> && pm2 kill` could be used but `/root/.pm2` is still created as the pm2 daemon runs for a short period.\r\n\r\n**Environment:**\r\nUbuntu 14.04.1 LTS\r\npm2 0.12.3"}}