Merge pull request #203 from Erope/master [no ci]
Fix SELinux for more system Co-authored-by: Erope <44471469+Erope@users.noreply.github.com>
This commit is contained in:
		
						commit
						a98e7351be
					
				@ -4,7 +4,7 @@
 | 
				
			|||||||
  <br>
 | 
					  <br>
 | 
				
			||||||
  <small><i>LOGO designed by <a href="https://xio.ng" target="_blank">熊大</a> .</i></small>
 | 
					  <small><i>LOGO designed by <a href="https://xio.ng" target="_blank">熊大</a> .</i></small>
 | 
				
			||||||
  <br><br>
 | 
					  <br><br>
 | 
				
			||||||
<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.13.13&logo=github&style=for-the-badge"> <img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.10.1-brightgreen?style=for-the-badge&logo=linux">
 | 
					<img src="https://img.shields.io/github/workflow/status/naiba/nezha/Dashboard%20image?label=Dash%20v0.13.13&logo=github&style=for-the-badge"> <img src="https://img.shields.io/github/v/release/naiba/nezha?color=brightgreen&label=Agent&style=for-the-badge&logo=github"> <img src="https://img.shields.io/github/workflow/status/naiba/nezha/Agent%20release?label=Agent%20CI&logo=github&style=for-the-badge"> <img src="https://img.shields.io/badge/Installer-v0.10.2-brightgreen?style=for-the-badge&logo=linux">
 | 
				
			||||||
  <br>
 | 
					  <br>
 | 
				
			||||||
  <br>
 | 
					  <br>
 | 
				
			||||||
  <p>:trollface: <b>Nezha Monitoring</b> self-hosted lightweight monitoring and operation and maintenance system. Supports system status, HTTP (SSL certificate change, upcoming expiration, expiration), TCP, Ping <b>monitoring</b> and <b>alerting</b>, execute scheduled tasks and <b>web terminal</b>.</p>
 | 
					  <p>:trollface: <b>Nezha Monitoring</b> self-hosted lightweight monitoring and operation and maintenance system. Supports system status, HTTP (SSL certificate change, upcoming expiration, expiration), TCP, Ping <b>monitoring</b> and <b>alerting</b>, execute scheduled tasks and <b>web terminal</b>.</p>
 | 
				
			||||||
 | 
				
			|||||||
@ -11,7 +11,7 @@ NZ_BASE_PATH="/opt/nezha"
 | 
				
			|||||||
NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard"
 | 
					NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard"
 | 
				
			||||||
NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
 | 
					NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
 | 
				
			||||||
NZ_AGENT_SERVICE="/etc/systemd/system/nezha-agent.service"
 | 
					NZ_AGENT_SERVICE="/etc/systemd/system/nezha-agent.service"
 | 
				
			||||||
NZ_VERSION="v0.10.1"
 | 
					NZ_VERSION="v0.10.2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
red='\033[0;31m'
 | 
					red='\033[0;31m'
 | 
				
			||||||
green='\033[0;32m'
 | 
					green='\033[0;32m'
 | 
				
			||||||
@ -198,7 +198,7 @@ install_dashboard() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
selinux(){
 | 
					selinux(){
 | 
				
			||||||
    #判断当前的状态
 | 
					    #判断当前的状态
 | 
				
			||||||
    getenforce | grep enfor
 | 
					    getenforce | grep '[Ee]nfor'
 | 
				
			||||||
    if [ $? -eq 0 ];then
 | 
					    if [ $? -eq 0 ];then
 | 
				
			||||||
        echo -e "SELinux是开启状态,正在关闭!" 
 | 
					        echo -e "SELinux是开启状态,正在关闭!" 
 | 
				
			||||||
        setenforce 0 &>/dev/null
 | 
					        setenforce 0 &>/dev/null
 | 
				
			||||||
 | 
				
			|||||||
@ -11,7 +11,7 @@ NZ_BASE_PATH="/opt/nezha"
 | 
				
			|||||||
NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard"
 | 
					NZ_DASHBOARD_PATH="${NZ_BASE_PATH}/dashboard"
 | 
				
			||||||
NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
 | 
					NZ_AGENT_PATH="${NZ_BASE_PATH}/agent"
 | 
				
			||||||
NZ_AGENT_SERVICE="/etc/systemd/system/nezha-agent.service"
 | 
					NZ_AGENT_SERVICE="/etc/systemd/system/nezha-agent.service"
 | 
				
			||||||
NZ_VERSION="v0.10.1"
 | 
					NZ_VERSION="v0.10.2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
red='\033[0;31m'
 | 
					red='\033[0;31m'
 | 
				
			||||||
green='\033[0;32m'
 | 
					green='\033[0;32m'
 | 
				
			||||||
@ -167,7 +167,7 @@ install_dashboard() {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
selinux(){
 | 
					selinux(){
 | 
				
			||||||
    #Check SELinux
 | 
					    #Check SELinux
 | 
				
			||||||
    getenforce | grep enfor
 | 
					    getenforce | grep '[Ee]nfor'
 | 
				
			||||||
    if [ $? -eq 0 ];then
 | 
					    if [ $? -eq 0 ];then
 | 
				
			||||||
        echo -e "SELinux running,closing now!" 
 | 
					        echo -e "SELinux running,closing now!" 
 | 
				
			||||||
        setenforce 0 &>/dev/null
 | 
					        setenforce 0 &>/dev/null
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user