{"action":"created","comment":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/comments/55851919","id":55851919,"diff_hunk":"@@ -0,0 +1,17 @@\n+# systemd unit example\n+[Unit]\n+Description=RabbitMQ broker\n+After=syslog.target network.target\n+\n+[Service]\n+Type=notify\n+User=rabbitmq\n+Group=rabbitmq\n+NotifyAccess=all\n+TimeoutStartSec=3600","path":"docs/rabbitmq-server.service.example","position":11,"original_position":11,"commit_id":"2d6383bade61fea0b8652b72d25bb1a9f0d6133f","original_commit_id":"2d6383bade61fea0b8652b72d25bb1a9f0d6133f","user":{"login":"dumbbell","id":159804,"avatar_url":"https://avatars.githubusercontent.com/u/159804?v=3","gravatar_id":"","url":"https://api.github.com/users/dumbbell","html_url":"https://github.com/dumbbell","followers_url":"https://api.github.com/users/dumbbell/followers","following_url":"https://api.github.com/users/dumbbell/following{/other_user}","gists_url":"https://api.github.com/users/dumbbell/gists{/gist_id}","starred_url":"https://api.github.com/users/dumbbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumbbell/subscriptions","organizations_url":"https://api.github.com/users/dumbbell/orgs","repos_url":"https://api.github.com/users/dumbbell/repos","events_url":"https://api.github.com/users/dumbbell/events{/privacy}","received_events_url":"https://api.github.com/users/dumbbell/received_events","type":"User","site_admin":false},"body":"I see you added a","created_at":"2016-03-11T16:24:43Z","updated_at":"2016-03-11T16:24:43Z","html_url":"https://github.com/rabbitmq/rabbitmq-server/pull/666#discussion_r55851919","pull_request_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/666","_links":{"self":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/comments/55851919"},"html":{"href":"https://github.com/rabbitmq/rabbitmq-server/pull/666#discussion_r55851919"},"pull_request":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/666"}}},"pull_request":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/666","id":61403085,"html_url":"https://github.com/rabbitmq/rabbitmq-server/pull/666","diff_url":"https://github.com/rabbitmq/rabbitmq-server/pull/666.diff","patch_url":"https://github.com/rabbitmq/rabbitmq-server/pull/666.patch","issue_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/666","number":666,"state":"open","locked":false,"title":"Systemd improvements","user":{"login":"binarin","id":185443,"avatar_url":"https://avatars.githubusercontent.com/u/185443?v=3","gravatar_id":"","url":"https://api.github.com/users/binarin","html_url":"https://github.com/binarin","followers_url":"https://api.github.com/users/binarin/followers","following_url":"https://api.github.com/users/binarin/following{/other_user}","gists_url":"https://api.github.com/users/binarin/gists{/gist_id}","starred_url":"https://api.github.com/users/binarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binarin/subscriptions","organizations_url":"https://api.github.com/users/binarin/orgs","repos_url":"https://api.github.com/users/binarin/repos","events_url":"https://api.github.com/users/binarin/events{/privacy}","received_events_url":"https://api.github.com/users/binarin/received_events","type":"User","site_admin":false},"body":"After some investigation I think that even with `sd_notify` MAINPID\r\ndetection didn't work 100% percent correctly.\r\n\r\nForeground broker was started through a shell process that was\r\nconverting signals into graceful shutdown commands. And it's pid of that\r\nproxy that was to be communicated to systemd. Automatic pid inference\r\nworked in case epmd was already running on machine, otherwise it was epmd\r\nwho was chosen as main process.\r\n\r\nThis commit introduces new environment variable to prevent creation of\r\nsuch a proxy process. And this var should be specified in unit\r\nfile (example added to docs/). New variable is needed due to following\r\nreasons:\r\n- No way to detect whether we are running under systemd or not\r\n- I was thinking about adding command-line switch instead, but there is\r\n  no way to work with \"$@\" in portable shell script.\r\n\r\nAnother improvement is writing message to stderr about graceful\r\nshutdown, just to be sure that shutdown was indeed graceful. In case of\r\nsystemd it will automatically appear in the journal.\r\n\r\nFixes #664","created_at":"2016-03-02T13:56:02Z","updated_at":"2016-03-11T16:24:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3c16e965f0902e96b4d1c268bb4da60689a50195","assignee":{"login":"dumbbell","id":159804,"avatar_url":"https://avatars.githubusercontent.com/u/159804?v=3","gravatar_id":"","url":"https://api.github.com/users/dumbbell","html_url":"https://github.com/dumbbell","followers_url":"https://api.github.com/users/dumbbell/followers","following_url":"https://api.github.com/users/dumbbell/following{/other_user}","gists_url":"https://api.github.com/users/dumbbell/gists{/gist_id}","starred_url":"https://api.github.com/users/dumbbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumbbell/subscriptions","organizations_url":"https://api.github.com/users/dumbbell/orgs","repos_url":"https://api.github.com/users/dumbbell/repos","events_url":"https://api.github.com/users/dumbbell/events{/privacy}","received_events_url":"https://api.github.com/users/dumbbell/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/milestones/3","html_url":"https://github.com/rabbitmq/rabbitmq-server/milestones/n/a","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/milestones/3/labels","id":1034785,"number":3,"title":"n/a","description":"Not applicable to a specific release","creator":{"login":"dumbbell","id":159804,"avatar_url":"https://avatars.githubusercontent.com/u/159804?v=3","gravatar_id":"","url":"https://api.github.com/users/dumbbell","html_url":"https://github.com/dumbbell","followers_url":"https://api.github.com/users/dumbbell/followers","following_url":"https://api.github.com/users/dumbbell/following{/other_user}","gists_url":"https://api.github.com/users/dumbbell/gists{/gist_id}","starred_url":"https://api.github.com/users/dumbbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dumbbell/subscriptions","organizations_url":"https://api.github.com/users/dumbbell/orgs","repos_url":"https://api.github.com/users/dumbbell/repos","events_url":"https://api.github.com/users/dumbbell/events{/privacy}","received_events_url":"https://api.github.com/users/dumbbell/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":278,"state":"closed","created_at":"2015-03-23T17:45:12Z","updated_at":"2016-03-11T16:18:44Z","due_on":null,"closed_at":"2015-03-24T10:00:50Z"},"commits_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/666/commits","review_comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/666/comments","review_comment_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/666/comments","statuses_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/statuses/2d6383bade61fea0b8652b72d25bb1a9f0d6133f","head":{"label":"binarin:rabbitmq-server-664","ref":"rabbitmq-server-664","sha":"2d6383bade61fea0b8652b72d25bb1a9f0d6133f","user":{"login":"binarin","id":185443,"avatar_url":"https://avatars.githubusercontent.com/u/185443?v=3","gravatar_id":"","url":"https://api.github.com/users/binarin","html_url":"https://github.com/binarin","followers_url":"https://api.github.com/users/binarin/followers","following_url":"https://api.github.com/users/binarin/following{/other_user}","gists_url":"https://api.github.com/users/binarin/gists{/gist_id}","starred_url":"https://api.github.com/users/binarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binarin/subscriptions","organizations_url":"https://api.github.com/users/binarin/orgs","repos_url":"https://api.github.com/users/binarin/repos","events_url":"https://api.github.com/users/binarin/events{/privacy}","received_events_url":"https://api.github.com/users/binarin/received_events","type":"User","site_admin":false},"repo":{"id":44625763,"name":"rabbitmq-server","full_name":"binarin/rabbitmq-server","owner":{"login":"binarin","id":185443,"avatar_url":"https://avatars.githubusercontent.com/u/185443?v=3","gravatar_id":"","url":"https://api.github.com/users/binarin","html_url":"https://github.com/binarin","followers_url":"https://api.github.com/users/binarin/followers","following_url":"https://api.github.com/users/binarin/following{/other_user}","gists_url":"https://api.github.com/users/binarin/gists{/gist_id}","starred_url":"https://api.github.com/users/binarin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/binarin/subscriptions","organizations_url":"https://api.github.com/users/binarin/orgs","repos_url":"https://api.github.com/users/binarin/repos","events_url":"https://api.github.com/users/binarin/events{/privacy}","received_events_url":"https://api.github.com/users/binarin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/binarin/rabbitmq-server","description":"Open source multi-protocol messaging broker","fork":true,"url":"https://api.github.com/repos/binarin/rabbitmq-server","forks_url":"https://api.github.com/repos/binarin/rabbitmq-server/forks","keys_url":"https://api.github.com/repos/binarin/rabbitmq-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/binarin/rabbitmq-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/binarin/rabbitmq-server/teams","hooks_url":"https://api.github.com/repos/binarin/rabbitmq-server/hooks","issue_events_url":"https://api.github.com/repos/binarin/rabbitmq-server/issues/events{/number}","events_url":"https://api.github.com/repos/binarin/rabbitmq-server/events","assignees_url":"https://api.github.com/repos/binarin/rabbitmq-server/assignees{/user}","branches_url":"https://api.github.com/repos/binarin/rabbitmq-server/branches{/branch}","tags_url":"https://api.github.com/repos/binarin/rabbitmq-server/tags","blobs_url":"https://api.github.com/repos/binarin/rabbitmq-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/binarin/rabbitmq-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/binarin/rabbitmq-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/binarin/rabbitmq-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/binarin/rabbitmq-server/statuses/{sha}","languages_url":"https://api.github.com/repos/binarin/rabbitmq-server/languages","stargazers_url":"https://api.github.com/repos/binarin/rabbitmq-server/stargazers","contributors_url":"https://api.github.com/repos/binarin/rabbitmq-server/contributors","subscribers_url":"https://api.github.com/repos/binarin/rabbitmq-server/subscribers","subscription_url":"https://api.github.com/repos/binarin/rabbitmq-server/subscription","commits_url":"https://api.github.com/repos/binarin/rabbitmq-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/binarin/rabbitmq-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/binarin/rabbitmq-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/binarin/rabbitmq-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/binarin/rabbitmq-server/contents/{+path}","compare_url":"https://api.github.com/repos/binarin/rabbitmq-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/binarin/rabbitmq-server/merges","archive_url":"https://api.github.com/repos/binarin/rabbitmq-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/binarin/rabbitmq-server/downloads","issues_url":"https://api.github.com/repos/binarin/rabbitmq-server/issues{/number}","pulls_url":"https://api.github.com/repos/binarin/rabbitmq-server/pulls{/number}","milestones_url":"https://api.github.com/repos/binarin/rabbitmq-server/milestones{/number}","notifications_url":"https://api.github.com/repos/binarin/rabbitmq-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/binarin/rabbitmq-server/labels{/name}","releases_url":"https://api.github.com/repos/binarin/rabbitmq-server/releases{/id}","deployments_url":"https://api.github.com/repos/binarin/rabbitmq-server/deployments","created_at":"2015-10-20T18:13:36Z","updated_at":"2015-10-20T18:13:48Z","pushed_at":"2016-03-11T16:11:02Z","git_url":"git://github.com/binarin/rabbitmq-server.git","ssh_url":"git@github.com:binarin/rabbitmq-server.git","clone_url":"https://github.com/binarin/rabbitmq-server.git","svn_url":"https://github.com/binarin/rabbitmq-server","homepage":"https://www.rabbitmq.com/","size":71885,"stargazers_count":0,"watchers_count":0,"language":"Erlang","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rabbitmq:stable","ref":"stable","sha":"9a02ab05715068740cb125123a271a8f705a6bde","user":{"login":"rabbitmq","id":96669,"avatar_url":"https://avatars.githubusercontent.com/u/96669?v=3","gravatar_id":"","url":"https://api.github.com/users/rabbitmq","html_url":"https://github.com/rabbitmq","followers_url":"https://api.github.com/users/rabbitmq/followers","following_url":"https://api.github.com/users/rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/rabbitmq/orgs","repos_url":"https://api.github.com/users/rabbitmq/repos","events_url":"https://api.github.com/users/rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitmq/received_events","type":"Organization","site_admin":false},"repo":{"id":924551,"name":"rabbitmq-server","full_name":"rabbitmq/rabbitmq-server","owner":{"login":"rabbitmq","id":96669,"avatar_url":"https://avatars.githubusercontent.com/u/96669?v=3","gravatar_id":"","url":"https://api.github.com/users/rabbitmq","html_url":"https://github.com/rabbitmq","followers_url":"https://api.github.com/users/rabbitmq/followers","following_url":"https://api.github.com/users/rabbitmq/following{/other_user}","gists_url":"https://api.github.com/users/rabbitmq/gists{/gist_id}","starred_url":"https://api.github.com/users/rabbitmq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rabbitmq/subscriptions","organizations_url":"https://api.github.com/users/rabbitmq/orgs","repos_url":"https://api.github.com/users/rabbitmq/repos","events_url":"https://api.github.com/users/rabbitmq/events{/privacy}","received_events_url":"https://api.github.com/users/rabbitmq/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rabbitmq/rabbitmq-server","description":"Open source multi-protocol messaging broker","fork":false,"url":"https://api.github.com/repos/rabbitmq/rabbitmq-server","forks_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/forks","keys_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/teams","hooks_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/hooks","issue_events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/events{/number}","events_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/events","assignees_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/assignees{/user}","branches_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/branches{/branch}","tags_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/tags","blobs_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/statuses/{sha}","languages_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/languages","stargazers_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/stargazers","contributors_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/contributors","subscribers_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/subscribers","subscription_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/subscription","commits_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/contents/{+path}","compare_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/merges","archive_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/downloads","issues_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues{/number}","pulls_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls{/number}","milestones_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/milestones{/number}","notifications_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/labels{/name}","releases_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/releases{/id}","deployments_url":"https://api.github.com/repos/rabbitmq/rabbitmq-server/deployments","created_at":"2010-09-20T10:29:16Z","updated_at":"2016-03-11T15:10:05Z","pushed_at":"2016-03-11T16:11:03Z","git_url":"git://github.com/rabbitmq/rabbitmq-server.git","ssh_url":"git@github.com:rabbitmq/rabbitmq-server.git","clone_url":"https://github.com/rabbitmq/rabbitmq-server.git","svn_url":"https://github.com/rabbitmq/rabbitmq-server","homepage":"https://www.rabbitmq.com/","size":109920,"stargazers_count":1500,"watchers_count":1500,"language":"Erlang","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":354,"mirror_url":null,"open_issues_count":72,"forks":354,"open_issues":72,"watchers":1500,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/666"},"html":{"href":"https://github.com/rabbitmq/rabbitmq-server/pull/666"},"issue":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/666"},"comments":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/issues/666/comments"},"review_comments":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/666/comments"},"review_comment":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/pulls/666/commits"},"statuses":{"href":"https://api.github.com/repos/rabbitmq/rabbitmq-server/statuses/2d6383bade61fea0b8652b72d25bb1a9f0d6133f"}}}}