{"action":"created","issue":{"url":"https://api.github.com/repos/chef-cookbooks/runit/issues/215","repository_url":"https://api.github.com/repos/chef-cookbooks/runit","labels_url":"https://api.github.com/repos/chef-cookbooks/runit/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/chef-cookbooks/runit/issues/215/comments","events_url":"https://api.github.com/repos/chef-cookbooks/runit/issues/215/events","html_url":"https://github.com/chef-cookbooks/runit/pull/215","id":214606318,"number":215,"title":"Don't double start when creating new services","user":{"login":"danp60","id":220241,"avatar_url":"https://avatars0.githubusercontent.com/u/220241?v=3","gravatar_id":"","url":"https://api.github.com/users/danp60","html_url":"https://github.com/danp60","followers_url":"https://api.github.com/users/danp60/followers","following_url":"https://api.github.com/users/danp60/following{/other_user}","gists_url":"https://api.github.com/users/danp60/gists{/gist_id}","starred_url":"https://api.github.com/users/danp60/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danp60/subscriptions","organizations_url":"https://api.github.com/users/danp60/orgs","repos_url":"https://api.github.com/users/danp60/repos","events_url":"https://api.github.com/users/danp60/events{/privacy}","received_events_url":"https://api.github.com/users/danp60/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-03-16T05:58:01Z","updated_at":"2017-05-17T21:56:33Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/chef-cookbooks/runit/pulls/215","html_url":"https://github.com/chef-cookbooks/runit/pull/215","diff_url":"https://github.com/chef-cookbooks/runit/pull/215.diff","patch_url":"https://github.com/chef-cookbooks/runit/pull/215.patch"},"body":"Signed-off-by: Daniel Low <danglow@gmail.com>\r\n\r\n### Description\r\n\r\nWe noticed that when creating a new service, the `:create` action would start the service twice. Once during the `action_enable` step and once again for `restart_service`. This PR fixes the issue by only restarting the service if the action was previously enabled. If the service was not previously enabled (either disabled or not created) then it's not necessary to restart the service after its been started.\r\n\r\n### Check List\r\n\r\n- [x] All tests pass. See <https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD>\r\n- [x] New functionality includes testing.\r\n- [x] New functionality has been documented in the README if applicable\r\n- [x] All commits have been signed for the Developer Certificate of Origin. See <https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD>\r\n"},"comment":{"url":"https://api.github.com/repos/chef-cookbooks/runit/issues/comments/302242994","html_url":"https://github.com/chef-cookbooks/runit/pull/215#issuecomment-302242994","issue_url":"https://api.github.com/repos/chef-cookbooks/runit/issues/215","id":302242994,"user":{"login":"danp60","id":220241,"avatar_url":"https://avatars0.githubusercontent.com/u/220241?v=3","gravatar_id":"","url":"https://api.github.com/users/danp60","html_url":"https://github.com/danp60","followers_url":"https://api.github.com/users/danp60/followers","following_url":"https://api.github.com/users/danp60/following{/other_user}","gists_url":"https://api.github.com/users/danp60/gists{/gist_id}","starred_url":"https://api.github.com/users/danp60/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danp60/subscriptions","organizations_url":"https://api.github.com/users/danp60/orgs","repos_url":"https://api.github.com/users/danp60/repos","events_url":"https://api.github.com/users/danp60/events{/privacy}","received_events_url":"https://api.github.com/users/danp60/received_events","type":"User","site_admin":false},"created_at":"2017-05-17T21:56:33Z","updated_at":"2017-05-17T21:56:33Z","body":"Any updates on this?"}}
{"actor":{"display_login":"danp60"}}