mirror of
				https://github.com/AdnanHodzic/auto-cpufreq.git
				synced 2025-10-31 19:24:34 +01:00 
			
		
		
		
	Verify the use of supported init systems. (#303)
This commit is contained in:
		
							parent
							
								
									1909cc87c1
								
							
						
					
					
						commit
						342e5fab86
					
				| @ -55,7 +55,7 @@ if [ "$(ps h -o comm 1)" = "runit" ];then | |||||||
| 		esac | 		esac | ||||||
| 	fi | 	fi | ||||||
| # Install script for systemd | # Install script for systemd | ||||||
| else | elif [ "$(ps h -o comm 1)" = "systemd" ];then | ||||||
|     echo -e "\n* Deploy auto-cpufreq systemd unit file" |     echo -e "\n* Deploy auto-cpufreq systemd unit file" | ||||||
|     cp /usr/local/share/auto-cpufreq/scripts/auto-cpufreq.service /etc/systemd/system/auto-cpufreq.service |     cp /usr/local/share/auto-cpufreq/scripts/auto-cpufreq.service /etc/systemd/system/auto-cpufreq.service | ||||||
| 
 | 
 | ||||||
| @ -70,4 +70,7 @@ else | |||||||
| 
 | 
 | ||||||
|     echo -e "\n* Enabling auto-cpufreq daemon (systemd) service at boot" |     echo -e "\n* Enabling auto-cpufreq daemon (systemd) service at boot" | ||||||
|     systemctl enable auto-cpufreq |     systemctl enable auto-cpufreq | ||||||
|  | else | ||||||
|  |   echo -e "\n* Unsupported init system detected, could not install the daemon\n" | ||||||
|  |   echo -e "\n* Please open an issue on https://github.com/AdnanHodzic/auto-cpufreq\n" | ||||||
| fi | fi | ||||||
|  | |||||||
| @ -36,7 +36,8 @@ if [ "$(ps h -o comm 1)" = "runit" ];then | |||||||
| 
 | 
 | ||||||
| 		esac | 		esac | ||||||
| 	fi | 	fi | ||||||
| else | # Remove service for systemd | ||||||
|  | elif [ "$(ps h -o comm 1)" = "systemd" ];then | ||||||
|     echo -e "\n* Stopping auto-cpufreq daemon (systemd) service" |     echo -e "\n* Stopping auto-cpufreq daemon (systemd) service" | ||||||
|     systemctl stop auto-cpufreq |     systemctl stop auto-cpufreq | ||||||
| 
 | 
 | ||||||
| @ -51,4 +52,7 @@ else | |||||||
| 
 | 
 | ||||||
|     echo -e "reset failed" |     echo -e "reset failed" | ||||||
|     systemctl reset-failed |     systemctl reset-failed | ||||||
|  | else | ||||||
|  |   echo -e "\n* Unsupported init system detected, could not remove the daemon\n" | ||||||
|  |   echo -e "\n* Please open an issue on https://github.com/AdnanHodzic/auto-cpufreq\n" | ||||||
| fi | fi | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user