{"action":"created","issue":{"url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2112","repository_url":"https://api.github.com/repos/pi-hole/pi-hole","labels_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2112/labels{/name}","comments_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2112/comments","events_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2112/events","html_url":"https://github.com/pi-hole/pi-hole/pull/2112","id":314314692,"node_id":"MDExOlB1bGxSZXF1ZXN0MTgxNjM5NDc0","number":2112,"title":"Install either init.d script or systemd unit depending on used init","user":{"login":"DL6ER","id":16748619,"node_id":"MDQ6VXNlcjE2NzQ4NjE5","avatar_url":"https://avatars2.githubusercontent.com/u/16748619?v=4","gravatar_id":"","url":"https://api.github.com/users/DL6ER","html_url":"https://github.com/DL6ER","followers_url":"https://api.github.com/users/DL6ER/followers","following_url":"https://api.github.com/users/DL6ER/following{/other_user}","gists_url":"https://api.github.com/users/DL6ER/gists{/gist_id}","starred_url":"https://api.github.com/users/DL6ER/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DL6ER/subscriptions","organizations_url":"https://api.github.com/users/DL6ER/orgs","repos_url":"https://api.github.com/users/DL6ER/repos","events_url":"https://api.github.com/users/DL6ER/events{/privacy}","received_events_url":"https://api.github.com/users/DL6ER/received_events","type":"User","site_admin":false},"labels":[{"id":105416351,"node_id":"MDU6TGFiZWwxMDU0MTYzNTE=","url":"https://api.github.com/repos/pi-hole/pi-hole/labels/Enhancement","name":"Enhancement","color":"3A96E2","default":false},{"id":476006043,"node_id":"MDU6TGFiZWw0NzYwMDYwNDM=","url":"https://api.github.com/repos/pi-hole/pi-hole/labels/Merge%20Conflict","name":"Merge Conflict","color":"EB4D5C","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pi-hole/pi-hole/milestones/29","html_url":"https://github.com/pi-hole/pi-hole/milestone/29","labels_url":"https://api.github.com/repos/pi-hole/pi-hole/milestones/29/labels","id":3528472,"node_id":"MDk6TWlsZXN0b25lMzUyODQ3Mg==","number":29,"title":"4.1","description":null,"creator":{"login":"dschaper","id":2782850,"node_id":"MDQ6VXNlcjI3ODI4NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/2782850?v=4","gravatar_id":"","url":"https://api.github.com/users/dschaper","html_url":"https://github.com/dschaper","followers_url":"https://api.github.com/users/dschaper/followers","following_url":"https://api.github.com/users/dschaper/following{/other_user}","gists_url":"https://api.github.com/users/dschaper/gists{/gist_id}","starred_url":"https://api.github.com/users/dschaper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschaper/subscriptions","organizations_url":"https://api.github.com/users/dschaper/orgs","repos_url":"https://api.github.com/users/dschaper/repos","events_url":"https://api.github.com/users/dschaper/events{/privacy}","received_events_url":"https://api.github.com/users/dschaper/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":22,"state":"open","created_at":"2018-07-27T16:41:45Z","updated_at":"2018-11-14T17:32:40Z","due_on":null,"closed_at":null},"comments":41,"created_at":"2018-04-14T09:31:25Z","updated_at":"2018-11-14T19:39:05Z","closed_at":"2018-11-14T17:32:40Z","author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/2112","html_url":"https://github.com/pi-hole/pi-hole/pull/2112","diff_url":"https://github.com/pi-hole/pi-hole/pull/2112.diff","patch_url":"https://github.com/pi-hole/pi-hole/pull/2112.patch"},"body":"**By submitting this pull request, I confirm the following:** \r\n*please fill any appropriate checkboxes, e.g: [X]*\r\n\r\n- [x] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md), as well as this entire template.\r\n- [x] I have made only one major change in my proposed changes.\r\n- [x] I have commented my proposed changes within the code.\r\n- [x] I have tested my proposed changes, and have included unit tests where possible.\r\n- [x] I am willing to help maintain this change if there are issues with it later.\r\n- [x] I give this submission freely and claim no ownership.\r\n- [x] It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.1)\r\n- [x] I have squashed any insignificant commits. ([`git rebase`](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))\r\n\r\nPlease make sure you [Sign Off](https://github.com/pi-hole/pi-hole/wiki/How-to-signoff-your-commits.) all commits. Pi-hole enforces the [DCO](https://github.com/pi-hole/pi-hole/wiki/Contributing-to-the-project).\r\n\r\n---\r\n**What does this PR aim to accomplish?:**\r\nReplace the ancient `init.d` script for starting and controlling the `pihole-FTL` process by a modern `systemd` unit. This should resolve some problems as discussed [here](https://discourse.pi-hole.net/t/service-pihole-ftl-active-exited/8335) or [here](https://discourse.pi-hole.net/t/pihole-ftl-is-working-but-webmin-says-the-service-is-not-running/8368).\r\n\r\nThis now also makes the `status` command behave correctly, as `systemd` can use the PID file of FTL to find out if it is actually running or not:\r\n![screenshot at 2018-04-14 11-24-00](https://user-images.githubusercontent.com/16748619/38766751-db805ed6-3fd6-11e8-99ad-ca925f00d11e.png)\r\n\r\nAlso, since *FTL*DNS is a very important part of your system, the unit ensures that it will be automatically restarted whenever something unexpected happens. As an example, I sent `SIGKILL` to FTL and as you can see, `systemd` took care about immediately restarting the service:\r\n![screenshot at 2018-04-14 11-27-08](https://user-images.githubusercontent.com/16748619/38766768-1276bd40-3fd7-11e8-97ea-3411a6f0479b.png)\r\nNote that we do not restart `pihole-FTL` automatically after having received `SIGTERM` as this is the correct way of terminating the resolver (e.g. through `service pihole-FTL stop`).\r\n\r\n**How does this PR accomplish the above?:**\r\nI wrote a systemd unit for `pihole-FTL` and modified the installer to replace the old init.d script.\r\n\r\n**What documentation changes (if any) are needed to support this PR?:**\r\nAll commands should work as before."},"comment":{"url":"https://api.github.com/repos/pi-hole/pi-hole/issues/comments/438791356","html_url":"https://github.com/pi-hole/pi-hole/pull/2112#issuecomment-438791356","issue_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2112","id":438791356,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODc5MTM1Ng==","user":{"login":"dschaper","id":2782850,"node_id":"MDQ6VXNlcjI3ODI4NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/2782850?v=4","gravatar_id":"","url":"https://api.github.com/users/dschaper","html_url":"https://github.com/dschaper","followers_url":"https://api.github.com/users/dschaper/followers","following_url":"https://api.github.com/users/dschaper/following{/other_user}","gists_url":"https://api.github.com/users/dschaper/gists{/gist_id}","starred_url":"https://api.github.com/users/dschaper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dschaper/subscriptions","organizations_url":"https://api.github.com/users/dschaper/orgs","repos_url":"https://api.github.com/users/dschaper/repos","events_url":"https://api.github.com/users/dschaper/events{/privacy}","received_events_url":"https://api.github.com/users/dschaper/received_events","type":"User","site_admin":false},"created_at":"2018-11-14T19:39:05Z","updated_at":"2018-11-14T19:39:05Z","author_association":"MEMBER","body":"Great... In that case it may be beneficial to do something like `if exists then source`. But there may be a more elegant solution out there, we can't be the first to run in to this."}}
{"actor":{"display_login":"dschaper"}}