{"action":"created","comment":{"url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/comments/144531043","pull_request_review_id":69200306,"id":144531043,"diff_hunk":"@@ -418,7 +418,37 @@ diagnose_operating_system() {\n     get_distro_attributes\n   else\n     # If it doesn't exist, it's not a system we currently support and link to FAQ\n-    log_write \"${CROSS} ${COL_LIGHT_RED}${error_msg}${COL_NC} (${FAQ_HARDWARE_REQUIREMENTS})\"\n+    log_write \"${CROSS} ${COL_RED}${error_msg}${COL_NC} (${FAQ_HARDWARE_REQUIREMENTS})\"\n+  fi\n+}\n+\n+check_selinux() {\n+  # SELinux is not supported by the Pi-hole\n+  echo_current_diagnostic \"SELinux\"\n+  # Check if a SELinux configuration file exists\n+  if [[ -f /etc/selinux/config ]]; then\n+    # If a SELinux configuration file was found, check the default SELinux mode.\n+    DEFAULT_SELINUX=$(awk -F= '/^SELINUX=/ {print $2}' /etc/selinux/config)\n+    case \"${DEFAULT_SELINUX,,}\" in\n+      enforcing)\n+        log_write \"${CROSS} ${COL_RED}Default SELinux: $DEFAULT_SELINUX${COL_NC}\"\n+        ;;\n+      *)  # 'permissive' and 'disabled'\n+        log_write \"${TICK} ${COL_GREEN}Default SELinux: $DEFAULT_SELINUX${COL_NC}\";\n+        ;;\n+    esac\n+    # Check the current state of SELinux\n+    CURRENT_SELINUX=$(getenforce)\n+    case \"${CURRENT_SELINUX,,}\" in\n+      enforcing)\n+        log_write \"${CROSS} ${COL_RED}Current SELinux: $CURRENT_SELINUX${COL_NC}\"\n+        ;;\n+      *)  # 'permissive' and 'disabled'\n+        log_write \"${TICK} ${COL_GREEN}Current SELinux: $CURRENT_SELINUX${COL_NC}\";\n+        ;;\n+    esac\n+  else\n+    log_write \"${TICK} ${COL_GREEN}SELinux not Supported${COL_NC}\";","path":"advanced/Scripts/piholeDebug.sh","position":153,"original_position":153,"commit_id":"8aceb8bf539a999e962ba71b2a7c9147fdf0a2bd","original_commit_id":"8aceb8bf539a999e962ba71b2a7c9147fdf0a2bd","user":{"login":"WaLLy3K","id":3049142,"avatar_url":"https://avatars3.githubusercontent.com/u/3049142?v=4","gravatar_id":"","url":"https://api.github.com/users/WaLLy3K","html_url":"https://github.com/WaLLy3K","followers_url":"https://api.github.com/users/WaLLy3K/followers","following_url":"https://api.github.com/users/WaLLy3K/following{/other_user}","gists_url":"https://api.github.com/users/WaLLy3K/gists{/gist_id}","starred_url":"https://api.github.com/users/WaLLy3K/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WaLLy3K/subscriptions","organizations_url":"https://api.github.com/users/WaLLy3K/orgs","repos_url":"https://api.github.com/users/WaLLy3K/repos","events_url":"https://api.github.com/users/WaLLy3K/events{/privacy}","received_events_url":"https://api.github.com/users/WaLLy3K/received_events","type":"User","site_admin":false},"body":"This is the default message that everyone will see, and I think it could be worded a little better. Perhaps \"SELinux not detected\"?","created_at":"2017-10-13T11:40:45Z","updated_at":"2017-10-13T11:40:45Z","html_url":"https://github.com/pi-hole/pi-hole/pull/1735#discussion_r144531043","pull_request_url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/1735","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/pi-hole/pi-hole/pulls/comments/144531043"},"html":{"href":"https://github.com/pi-hole/pi-hole/pull/1735#discussion_r144531043"},"pull_request":{"href":"https://api.github.com/repos/pi-hole/pi-hole/pulls/1735"}}},"pull_request":{"url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/1735","id":146360489,"html_url":"https://github.com/pi-hole/pi-hole/pull/1735","diff_url":"https://github.com/pi-hole/pi-hole/pull/1735.diff","patch_url":"https://github.com/pi-hole/pi-hole/pull/1735.patch","issue_url":"https://api.github.com/repos/pi-hole/pi-hole/issues/1735","number":1735,"state":"open","locked":false,"title":"add SELinux checks to debug script","user":{"login":"bcambl","id":5565939,"avatar_url":"https://avatars3.githubusercontent.com/u/5565939?v=4","gravatar_id":"","url":"https://api.github.com/users/bcambl","html_url":"https://github.com/bcambl","followers_url":"https://api.github.com/users/bcambl/followers","following_url":"https://api.github.com/users/bcambl/following{/other_user}","gists_url":"https://api.github.com/users/bcambl/gists{/gist_id}","starred_url":"https://api.github.com/users/bcambl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcambl/subscriptions","organizations_url":"https://api.github.com/users/bcambl/orgs","repos_url":"https://api.github.com/users/bcambl/repos","events_url":"https://api.github.com/users/bcambl/events{/privacy}","received_events_url":"https://api.github.com/users/bcambl/received_events","type":"User","site_admin":false},"body":"**By submitting this pull request, I confirm the following:**\r\n\r\n- [x] I have read and understood the [contributors guide](https://github.com/pi-hole/pi-hole/blob/master/CONTRIBUTING.md).\r\n- [x] I have checked that [another pull request](https://github.com/pi-hole/pi-hole/pulls) for this purpose does not exist.\r\n- [x] I have considered, and confirmed that this submission will be valuable to others.\r\n- [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer.\r\n- [x] I give this submission freely, and claim no ownership to its content.\r\n\r\n**How familiar are you with the codebase?:**\r\n8\r\n\r\n---\r\nAdd debug checks for both runtime and default SELinux states.\r\n","created_at":"2017-10-13T02:49:12Z","updated_at":"2017-10-13T11:40:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b89509191984118ebf7203ffe7954c494119efa4","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/1735/commits","review_comments_url":"https://api.github.com/repos/pi-hole/pi-hole/pulls/1735/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/1735/comments","statuses_url":"https://api.github.com/repos/pi-hole/pi-hole/statuses/8aceb8bf539a999e962ba71b2a7c9147fdf0a2bd","head":{"label":"bcambl:debug_selinux","ref":"debug_selinux","sha":"8aceb8bf539a999e962ba71b2a7c9147fdf0a2bd","user":{"login":"bcambl","id":5565939,"avatar_url":"https://avatars3.githubusercontent.com/u/5565939?v=4","gravatar_id":"","url":"https://api.github.com/users/bcambl","html_url":"https://github.com/bcambl","followers_url":"https://api.github.com/users/bcambl/followers","following_url":"https://api.github.com/users/bcambl/following{/other_user}","gists_url":"https://api.github.com/users/bcambl/gists{/gist_id}","starred_url":"https://api.github.com/users/bcambl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcambl/subscriptions","organizations_url":"https://api.github.com/users/bcambl/orgs","repos_url":"https://api.github.com/users/bcambl/repos","events_url":"https://api.github.com/users/bcambl/events{/privacy}","received_events_url":"https://api.github.com/users/bcambl/received_events","type":"User","site_admin":false},"repo":{"id":57098867,"name":"pi-hole","full_name":"bcambl/pi-hole","owner":{"login":"bcambl","id":5565939,"avatar_url":"https://avatars3.githubusercontent.com/u/5565939?v=4","gravatar_id":"","url":"https://api.github.com/users/bcambl","html_url":"https://github.com/bcambl","followers_url":"https://api.github.com/users/bcambl/followers","following_url":"https://api.github.com/users/bcambl/following{/other_user}","gists_url":"https://api.github.com/users/bcambl/gists{/gist_id}","starred_url":"https://api.github.com/users/bcambl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcambl/subscriptions","organizations_url":"https://api.github.com/users/bcambl/orgs","repos_url":"https://api.github.com/users/bcambl/repos","events_url":"https://api.github.com/users/bcambl/events{/privacy}","received_events_url":"https://api.github.com/users/bcambl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bcambl/pi-hole","description":"A black hole for Internet advertisements (designed for Raspberry Pi)","fork":true,"url":"https://api.github.com/repos/bcambl/pi-hole","forks_url":"https://api.github.com/repos/bcambl/pi-hole/forks","keys_url":"https://api.github.com/repos/bcambl/pi-hole/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcambl/pi-hole/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcambl/pi-hole/teams","hooks_url":"https://api.github.com/repos/bcambl/pi-hole/hooks","issue_events_url":"https://api.github.com/repos/bcambl/pi-hole/issues/events{/number}","events_url":"https://api.github.com/repos/bcambl/pi-hole/events","assignees_url":"https://api.github.com/repos/bcambl/pi-hole/assignees{/user}","branches_url":"https://api.github.com/repos/bcambl/pi-hole/branches{/branch}","tags_url":"https://api.github.com/repos/bcambl/pi-hole/tags","blobs_url":"https://api.github.com/repos/bcambl/pi-hole/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcambl/pi-hole/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcambl/pi-hole/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcambl/pi-hole/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcambl/pi-hole/statuses/{sha}","languages_url":"https://api.github.com/repos/bcambl/pi-hole/languages","stargazers_url":"https://api.github.com/repos/bcambl/pi-hole/stargazers","contributors_url":"https://api.github.com/repos/bcambl/pi-hole/contributors","subscribers_url":"https://api.github.com/repos/bcambl/pi-hole/subscribers","subscription_url":"https://api.github.com/repos/bcambl/pi-hole/subscription","commits_url":"https://api.github.com/repos/bcambl/pi-hole/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcambl/pi-hole/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcambl/pi-hole/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcambl/pi-hole/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcambl/pi-hole/contents/{+path}","compare_url":"https://api.github.com/repos/bcambl/pi-hole/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcambl/pi-hole/merges","archive_url":"https://api.github.com/repos/bcambl/pi-hole/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcambl/pi-hole/downloads","issues_url":"https://api.github.com/repos/bcambl/pi-hole/issues{/number}","pulls_url":"https://api.github.com/repos/bcambl/pi-hole/pulls{/number}","milestones_url":"https://api.github.com/repos/bcambl/pi-hole/milestones{/number}","notifications_url":"https://api.github.com/repos/bcambl/pi-hole/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcambl/pi-hole/labels{/name}","releases_url":"https://api.github.com/repos/bcambl/pi-hole/releases{/id}","deployments_url":"https://api.github.com/repos/bcambl/pi-hole/deployments","created_at":"2016-04-26T04:53:41Z","updated_at":"2016-04-26T04:53:42Z","pushed_at":"2017-10-13T05:42:29Z","git_url":"git://github.com/bcambl/pi-hole.git","ssh_url":"git@github.com:bcambl/pi-hole.git","clone_url":"https://github.com/bcambl/pi-hole.git","svn_url":"https://github.com/bcambl/pi-hole","homepage":"https://pi-hole.net","size":2987,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"bcdev"}},"base":{"label":"pi-hole:development","ref":"development","sha":"3e727c5e5dceb9da935d328bff5161f2162eaba2","user":{"login":"pi-hole","id":16827203,"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,"name":"pi-hole","full_name":"pi-hole/pi-hole","owner":{"login":"pi-hole","id":16827203,"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":"2017-10-13T11:34:51Z","pushed_at":"2017-10-13T05:42:31Z","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":3176,"stargazers_count":5657,"watchers_count":5657,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":503,"mirror_url":null,"open_issues_count":58,"forks":503,"open_issues":58,"watchers":5657,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pi-hole/pi-hole/pulls/1735"},"html":{"href":"https://github.com/pi-hole/pi-hole/pull/1735"},"issue":{"href":"https://api.github.com/repos/pi-hole/pi-hole/issues/1735"},"comments":{"href":"https://api.github.com/repos/pi-hole/pi-hole/issues/1735/comments"},"review_comments":{"href":"https://api.github.com/repos/pi-hole/pi-hole/pulls/1735/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/1735/commits"},"statuses":{"href":"https://api.github.com/repos/pi-hole/pi-hole/statuses/8aceb8bf539a999e962ba71b2a7c9147fdf0a2bd"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"WaLLy3K"}}