{"action":"created","comment":{"url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/comments/194208255","pull_request_review_id":127346091,"id":194208255,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDIwODI1NQ==","diff_hunk":"@@ -1388,27 +1406,61 @@ check_service_active() {\n   fi\n }\n \n-# Systemd-resolved's DNSStubListener and dnsmasq can't share port 53. \n+# Systemd-resolved's DNSStubListener and dnsmasq can't share port 53.\n disable_resolved_stublistener() {\n-  echo -en \"  ${INFO} Testing if systemd-resolved is enabled\"\n-  # Check if Systemd-resolved's DNSStubListener is enabled and active on port 53\n-  if check_service_active \"systemd-resolved\"; then\n-    # Check if DNSStubListener is enabled\n-    echo -en \"  ${OVER}  ${INFO} Testing if systemd-resolved DNSStub-Listener is active\"\n-    if ( grep -E '#?DNSStubListener=yes' /etc/systemd/resolved.conf &> /dev/null ); then\n-      # Disable the DNSStubListener to unbind it from port 53\n-      # Note that this breaks dns functionality on host until dnsmasq/ftl are up and running\n-      echo -en \"${OVER}  ${TICK} Disabling systemd-resolved DNSStubListener\"\n-      # Make a backup of the original /etc/systemd/resolved.conf\n+#  echo -en \"  ${INFO} Testing if systemd-resolved is enabled\"\n+  # Check if Systemd-resolved's DNSStubListener flag is present\n+  if [[ \"$systemd_resolved_flag\" -gt 0 ]]; then\n+    if check_service_active \"systemd-resolved\"; then\n+      # Check if DNSStubListener is enabled\n+      echo -en \"  ${OVER}  ${INFO} Testing if systemd-resolved DNSStub-Listener is active\"\n+      if ( grep -E '#?DNSStubListener=yes' /etc/systemd/resolved.conf &> /dev/null ); then\n+        # Disable the DNSStubListener to unbind it from port 53\n+        # Note that this breaks dns functionality on host until dnsmasq/ftl are up and running\n+        echo -en \"${OVER}  ${TICK} Disabling systemd-resolved DNSStubListener\"\n+        # Make a backup of the original /etc/systemd/resolved.conf\n+        # (This will need to be restored on uninstallation)\n+        ${SUDO} sed -r -i.orig 's/#?DNSStubListener=yes/DNSStubListener=no/g' /etc/systemd/resolved.conf\n+        echo -e \" and restarting systemd-resolved\"\n+        ${SUDO} systemctl reload-or-restart systemd-resolved\n+      else\n+        echo -e \"${OVER}  ${INFO} Systemd-resolved does not need to be restarted\"\n+      fi\n+    fi\n+  else\n+    echo -e \"${OVER}  ${INFO} Systemd-resolved is not enabled\"","path":"automated install/basic-install.sh","position":118,"original_position":82,"commit_id":"4d33ffabca9a78b04b7af5bd895eba47dd5bf46f","original_commit_id":"4d33ffabca9a78b04b7af5bd895eba47dd5bf46f","user":{"login":"Mcat12","id":4417660,"node_id":"MDQ6VXNlcjQ0MTc2NjA=","avatar_url":"https://avatars2.githubusercontent.com/u/4417660?v=4","gravatar_id":"","url":"https://api.github.com/users/Mcat12","html_url":"https://github.com/Mcat12","followers_url":"https://api.github.com/users/Mcat12/followers","following_url":"https://api.github.com/users/Mcat12/following{/other_user}","gists_url":"https://api.github.com/users/Mcat12/gists{/gist_id}","starred_url":"https://api.github.com/users/Mcat12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mcat12/subscriptions","organizations_url":"https://api.github.com/users/Mcat12/orgs","repos_url":"https://api.github.com/users/Mcat12/repos","events_url":"https://api.github.com/users/Mcat12/events{/privacy}","received_events_url":"https://api.github.com/users/Mcat12/received_events","type":"User","site_admin":false},"body":"You don't need to echo this if you aren't echoing that you're testing for systemd-resolved","created_at":"2018-06-09T00:43:11Z","updated_at":"2018-06-09T00:52:41Z","html_url":"https://github.com/pi-hole/pi-hole/pull/2218#discussion_r194208255","pull_request_url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/2218","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/pi-hole/pi-hole/pulls/comments/194208255"},"html":{"href":"https://github.com/pi-hole/pi-hole/pull/2218#discussion_r194208255"},"pull_request":{"href":"https://api.github.com/repos/pi-hole/pi-hole/pulls/2218"}}},"pull_request":{"url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/2218","id":192511360,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyNTExMzYw","html_url":"https://github.com/pi-hole/pi-hole/pull/2218","diff_url":"https://github.com/pi-hole/pi-hole/pull/2218.diff","patch_url":"https://github.com/pi-hole/pi-hole/pull/2218.patch","issue_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2218","number":2218,"state":"open","locked":false,"title":"Added generic port 53 check around Rob's Disable SystemD's DNS Stub Resolver On Install","user":{"login":"RamSet","id":20760161,"node_id":"MDQ6VXNlcjIwNzYwMTYx","avatar_url":"https://avatars1.githubusercontent.com/u/20760161?v=4","gravatar_id":"","url":"https://api.github.com/users/RamSet","html_url":"https://github.com/RamSet","followers_url":"https://api.github.com/users/RamSet/followers","following_url":"https://api.github.com/users/RamSet/following{/other_user}","gists_url":"https://api.github.com/users/RamSet/gists{/gist_id}","starred_url":"https://api.github.com/users/RamSet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RamSet/subscriptions","organizations_url":"https://api.github.com/users/RamSet/orgs","repos_url":"https://api.github.com/users/RamSet/repos","events_url":"https://api.github.com/users/RamSet/events{/privacy}","received_events_url":"https://api.github.com/users/RamSet/received_events","type":"User","site_admin":false},"body":"Added generic port 53 check around Rob's Disable SystemD's DNS Stub Resolver On Install\r\n\r\nSigned-off-by: RamSet <RamSet@gmail.com>\r\n\r\n**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\nUpon install/repair, port 53 is checked for availability.\r\n\r\n**How does this PR accomplish the above?:**\r\n\r\nIf port 53 is in use by pihole-FTL, the installer proceed and allows install:\r\n![image](https://user-images.githubusercontent.com/20760161/40937143-e25c59b6-67fa-11e8-92c9-ba363ee46095.png)\r\n\r\nIf however port is in use by something else, the installer will show the process name using it and will point the user towards a discourse post for troubleshooting.\r\n\r\n![image](https://user-images.githubusercontent.com/20760161/40937265-45df020e-67fb-11e8-8488-5a182afed3d9.png)\r\n\r\nIf port 53 is used by SystemD's DNS Stub Resolver, install script will execute `disable_resolved_stublistener`\r\n\r\n\r\n**What documentation changes (if any) are needed to support this PR?:**\r\n\r\n\r\n---\r\n* You must follow the template instructions. Failure to do so will result in your pull request being closed.\r\n* Please respect that Pi-hole is developed by volunteers, who can only reply in their spare time.\r\n\r\n","created_at":"2018-06-04T19:56:42Z","updated_at":"2018-06-09T00:52:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fe1834d1820009cd9747587704e1406eebdc31c8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/2218/commits","review_comments_url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/2218/comments","review_comment_url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/2218/comments","statuses_url":"https://api.github.com/repos/pi-hole/pi-hole/statuses/4d33ffabca9a78b04b7af5bd895eba47dd5bf46f","head":{"label":"RamSet:tweak/Port53Check","ref":"tweak/Port53Check","sha":"4d33ffabca9a78b04b7af5bd895eba47dd5bf46f","user":{"login":"RamSet","id":20760161,"node_id":"MDQ6VXNlcjIwNzYwMTYx","avatar_url":"https://avatars1.githubusercontent.com/u/20760161?v=4","gravatar_id":"","url":"https://api.github.com/users/RamSet","html_url":"https://github.com/RamSet","followers_url":"https://api.github.com/users/RamSet/followers","following_url":"https://api.github.com/users/RamSet/following{/other_user}","gists_url":"https://api.github.com/users/RamSet/gists{/gist_id}","starred_url":"https://api.github.com/users/RamSet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RamSet/subscriptions","organizations_url":"https://api.github.com/users/RamSet/orgs","repos_url":"https://api.github.com/users/RamSet/repos","events_url":"https://api.github.com/users/RamSet/events{/privacy}","received_events_url":"https://api.github.com/users/RamSet/received_events","type":"User","site_admin":false},"repo":{"id":136075193,"node_id":"MDEwOlJlcG9zaXRvcnkxMzYwNzUxOTM=","name":"pi-hole","full_name":"RamSet/pi-hole","owner":{"login":"RamSet","id":20760161,"node_id":"MDQ6VXNlcjIwNzYwMTYx","avatar_url":"https://avatars1.githubusercontent.com/u/20760161?v=4","gravatar_id":"","url":"https://api.github.com/users/RamSet","html_url":"https://github.com/RamSet","followers_url":"https://api.github.com/users/RamSet/followers","following_url":"https://api.github.com/users/RamSet/following{/other_user}","gists_url":"https://api.github.com/users/RamSet/gists{/gist_id}","starred_url":"https://api.github.com/users/RamSet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RamSet/subscriptions","organizations_url":"https://api.github.com/users/RamSet/orgs","repos_url":"https://api.github.com/users/RamSet/repos","events_url":"https://api.github.com/users/RamSet/events{/privacy}","received_events_url":"https://api.github.com/users/RamSet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RamSet/pi-hole","description":"A black hole for Internet advertisements","fork":true,"url":"https://api.github.com/repos/RamSet/pi-hole","forks_url":"https://api.github.com/repos/RamSet/pi-hole/forks","keys_url":"https://api.github.com/repos/RamSet/pi-hole/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RamSet/pi-hole/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RamSet/pi-hole/teams","hooks_url":"https://api.github.com/repos/RamSet/pi-hole/hooks","issue_events_url":"https://api.github.com/repos/RamSet/pi-hole/issues/events{/number}","events_url":"https://api.github.com/repos/RamSet/pi-hole/events","assignees_url":"https://api.github.com/repos/RamSet/pi-hole/assignees{/user}","branches_url":"https://api.github.com/repos/RamSet/pi-hole/branches{/branch}","tags_url":"https://api.github.com/repos/RamSet/pi-hole/tags","blobs_url":"https://api.github.com/repos/RamSet/pi-hole/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RamSet/pi-hole/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RamSet/pi-hole/git/refs{/sha}","trees_url":"https://api.github.com/repos/RamSet/pi-hole/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RamSet/pi-hole/statuses/{sha}","languages_url":"https://api.github.com/repos/RamSet/pi-hole/languages","stargazers_url":"https://api.github.com/repos/RamSet/pi-hole/stargazers","contributors_url":"https://api.github.com/repos/RamSet/pi-hole/contributors","subscribers_url":"https://api.github.com/repos/RamSet/pi-hole/subscribers","subscription_url":"https://api.github.com/repos/RamSet/pi-hole/subscription","commits_url":"https://api.github.com/repos/RamSet/pi-hole/commits{/sha}","git_commits_url":"https://api.github.com/repos/RamSet/pi-hole/git/commits{/sha}","comments_url":"https://api.github.com/repos/RamSet/pi-hole/comments{/number}","issue_comment_url":"https://api.github.com/repos/RamSet/pi-hole/issues/comments{/number}","contents_url":"https://api.github.com/repos/RamSet/pi-hole/contents/{+path}","compare_url":"https://api.github.com/repos/RamSet/pi-hole/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RamSet/pi-hole/merges","archive_url":"https://api.github.com/repos/RamSet/pi-hole/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RamSet/pi-hole/downloads","issues_url":"https://api.github.com/repos/RamSet/pi-hole/issues{/number}","pulls_url":"https://api.github.com/repos/RamSet/pi-hole/pulls{/number}","milestones_url":"https://api.github.com/repos/RamSet/pi-hole/milestones{/number}","notifications_url":"https://api.github.com/repos/RamSet/pi-hole/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RamSet/pi-hole/labels{/name}","releases_url":"https://api.github.com/repos/RamSet/pi-hole/releases{/id}","deployments_url":"https://api.github.com/repos/RamSet/pi-hole/deployments","created_at":"2018-06-04T19:50:31Z","updated_at":"2018-06-04T19:50:33Z","pushed_at":"2018-06-06T23:14:35Z","git_url":"git://github.com/RamSet/pi-hole.git","ssh_url":"git@github.com:RamSet/pi-hole.git","clone_url":"https://github.com/RamSet/pi-hole.git","svn_url":"https://github.com/RamSet/pi-hole","homepage":"https://pi-hole.net","size":3870,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pi-hole:development","ref":"development","sha":"d232f08933900db95ff0306c0b5b8d54e79b2b66","user":{"login":"pi-hole","id":16827203,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODI3MjAz","avatar_url":"https://avatars2.githubusercontent.com/u/16827203?v=4","gravatar_id":"","url":"https://api.github.com/users/pi-hole","html_url":"https://github.com/pi-hole","followers_url":"https://api.github.com/users/pi-hole/followers","following_url":"https://api.github.com/users/pi-hole/following{/other_user}","gists_url":"https://api.github.com/users/pi-hole/gists{/gist_id}","starred_url":"https://api.github.com/users/pi-hole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pi-hole/subscriptions","organizations_url":"https://api.github.com/users/pi-hole/orgs","repos_url":"https://api.github.com/users/pi-hole/repos","events_url":"https://api.github.com/users/pi-hole/events{/privacy}","received_events_url":"https://api.github.com/users/pi-hole/received_events","type":"Organization","site_admin":false},"repo":{"id":20619036,"node_id":"MDEwOlJlcG9zaXRvcnkyMDYxOTAzNg==","name":"pi-hole","full_name":"pi-hole/pi-hole","owner":{"login":"pi-hole","id":16827203,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODI3MjAz","avatar_url":"https://avatars2.githubusercontent.com/u/16827203?v=4","gravatar_id":"","url":"https://api.github.com/users/pi-hole","html_url":"https://github.com/pi-hole","followers_url":"https://api.github.com/users/pi-hole/followers","following_url":"https://api.github.com/users/pi-hole/following{/other_user}","gists_url":"https://api.github.com/users/pi-hole/gists{/gist_id}","starred_url":"https://api.github.com/users/pi-hole/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pi-hole/subscriptions","organizations_url":"https://api.github.com/users/pi-hole/orgs","repos_url":"https://api.github.com/users/pi-hole/repos","events_url":"https://api.github.com/users/pi-hole/events{/privacy}","received_events_url":"https://api.github.com/users/pi-hole/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pi-hole/pi-hole","description":"A black hole for Internet advertisements","fork":false,"url":"https://api.github.com/repos/pi-hole/pi-hole","forks_url":"https://api.github.com/repos/pi-hole/pi-hole/forks","keys_url":"https://api.github.com/repos/pi-hole/pi-hole/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pi-hole/pi-hole/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pi-hole/pi-hole/teams","hooks_url":"https://api.github.com/repos/pi-hole/pi-hole/hooks","issue_events_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/events{/number}","events_url":"https://api.github.com/repos/pi-hole/pi-hole/events","assignees_url":"https://api.github.com/repos/pi-hole/pi-hole/assignees{/user}","branches_url":"https://api.github.com/repos/pi-hole/pi-hole/branches{/branch}","tags_url":"https://api.github.com/repos/pi-hole/pi-hole/tags","blobs_url":"https://api.github.com/repos/pi-hole/pi-hole/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pi-hole/pi-hole/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pi-hole/pi-hole/git/refs{/sha}","trees_url":"https://api.github.com/repos/pi-hole/pi-hole/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pi-hole/pi-hole/statuses/{sha}","languages_url":"https://api.github.com/repos/pi-hole/pi-hole/languages","stargazers_url":"https://api.github.com/repos/pi-hole/pi-hole/stargazers","contributors_url":"https://api.github.com/repos/pi-hole/pi-hole/contributors","subscribers_url":"https://api.github.com/repos/pi-hole/pi-hole/subscribers","subscription_url":"https://api.github.com/repos/pi-hole/pi-hole/subscription","commits_url":"https://api.github.com/repos/pi-hole/pi-hole/commits{/sha}","git_commits_url":"https://api.github.com/repos/pi-hole/pi-hole/git/commits{/sha}","comments_url":"https://api.github.com/repos/pi-hole/pi-hole/comments{/number}","issue_comment_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/comments{/number}","contents_url":"https://api.github.com/repos/pi-hole/pi-hole/contents/{+path}","compare_url":"https://api.github.com/repos/pi-hole/pi-hole/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pi-hole/pi-hole/merges","archive_url":"https://api.github.com/repos/pi-hole/pi-hole/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pi-hole/pi-hole/downloads","issues_url":"https://api.github.com/repos/pi-hole/pi-hole/issues{/number}","pulls_url":"https://api.github.com/repos/pi-hole/pi-hole/pulls{/number}","milestones_url":"https://api.github.com/repos/pi-hole/pi-hole/milestones{/number}","notifications_url":"https://api.github.com/repos/pi-hole/pi-hole/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pi-hole/pi-hole/labels{/name}","releases_url":"https://api.github.com/repos/pi-hole/pi-hole/releases{/id}","deployments_url":"https://api.github.com/repos/pi-hole/pi-hole/deployments","created_at":"2014-06-08T15:02:55Z","updated_at":"2018-06-09T00:26:43Z","pushed_at":"2018-06-09T00:30:06Z","git_url":"git://github.com/pi-hole/pi-hole.git","ssh_url":"git@github.com:pi-hole/pi-hole.git","clone_url":"https://github.com/pi-hole/pi-hole.git","svn_url":"https://github.com/pi-hole/pi-hole","homepage":"https://pi-hole.net","size":3916,"stargazers_count":8797,"watchers_count":8797,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":721,"mirror_url":null,"archived":false,"open_issues_count":55,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":721,"open_issues":55,"watchers":8797,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pi-hole/pi-hole/pulls/2218"},"html":{"href":"https://github.com/pi-hole/pi-hole/pull/2218"},"issue":{"href":"https://api.github.com/repos/pi-hole/pi-hole/issues/2218"},"comments":{"href":"https://api.github.com/repos/pi-hole/pi-hole/issues/2218/comments"},"review_comments":{"href":"https://api.github.com/repos/pi-hole/pi-hole/pulls/2218/comments"},"review_comment":{"href":"https://api.github.com/repos/pi-hole/pi-hole/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pi-hole/pi-hole/pulls/2218/commits"},"statuses":{"href":"https://api.github.com/repos/pi-hole/pi-hole/statuses/4d33ffabca9a78b04b7af5bd895eba47dd5bf46f"}},"author_association":"NONE"}}
{"actor":{"display_login":"Mcat12"}}