mirror of
				https://github.com/AdnanHodzic/auto-cpufreq.git
				synced 2025-10-31 11:14:39 +01:00 
			
		
		
		
	Revert "install service file to proper location; enable and start service (#259)"
This reverts commit af7b92b104aa0736bde371bf66fa10299252f139.
This commit is contained in:
		
							parent
							
								
									af7b92b104
								
							
						
					
					
						commit
						826a63b3da
					
				| @ -33,25 +33,11 @@ function pip_pkg_install { | |||||||
|   python3 -m pip install -r requirements.txt |   python3 -m pip install -r requirements.txt | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function install_service_file { |  | ||||||
|   echo -e "\nInstall service file (/usr/local/share/auto-cpufreq.service -> /usr/lib/systemd/system/auto-cpufreq.service)" |  | ||||||
|   cp -av /usr/local/share/auto-cpufreq/scripts/auto-cpufreq.service /usr/lib/systemd/system/auto-cpufreq.service |  | ||||||
|   /usr/bin/systemctl daemon-reload |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| function start_service { |  | ||||||
|   echo -e "\nEnabling and starting auto-cpufreq service" |  | ||||||
|   /usr/bin/systemctl enable auto-cpufreq |  | ||||||
|   /usr/bin/systemctl start auto-cpufreq |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| # tool install | # tool install | ||||||
| function install { | function install { | ||||||
|   python3 setup.py install --record files.txt |   python3 setup.py install --record files.txt | ||||||
|   mkdir -p /usr/local/share/auto-cpufreq/ |   mkdir -p /usr/local/share/auto-cpufreq/ | ||||||
|   cp -r scripts/ /usr/local/share/auto-cpufreq/ |   cp -r scripts/ /usr/local/share/auto-cpufreq/ | ||||||
|   install_service_file |  | ||||||
|   start_service |  | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| function update_service_file { | function update_service_file { | ||||||
| @ -60,8 +46,6 @@ function update_service_file { | |||||||
| 	  /usr/local/share/auto-cpufreq/scripts/auto-cpufreq.service | 	  /usr/local/share/auto-cpufreq/scripts/auto-cpufreq.service | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| # First argument is the distro | # First argument is the distro | ||||||
| function detected_distro() { | function detected_distro() { | ||||||
|   echo -e "\nDetected $1 distribution" |   echo -e "\nDetected $1 distribution" | ||||||
| @ -165,7 +149,6 @@ function tool_remove { | |||||||
|   srv_remove="/usr/bin/auto-cpufreq-remove" |   srv_remove="/usr/bin/auto-cpufreq-remove" | ||||||
|   stats_file="/var/run/auto-cpufreq.stats" |   stats_file="/var/run/auto-cpufreq.stats" | ||||||
|   tool_proc_rm="auto-cpufreq --remove" |   tool_proc_rm="auto-cpufreq --remove" | ||||||
|   service_file="/usr/lib/systemd/system/auto-cpufreq.service" |  | ||||||
| 
 | 
 | ||||||
|   # stop any running auto-cpufreq argument (daemon/live/monitor) |   # stop any running auto-cpufreq argument (daemon/live/monitor) | ||||||
|   tool_arg_pids=($(pgrep -f "auto-cpufreq --")) |   tool_arg_pids=($(pgrep -f "auto-cpufreq --")) | ||||||
| @ -188,10 +171,6 @@ function tool_remove { | |||||||
|   [ -f $srv_install ] && rm $srv_install |   [ -f $srv_install ] && rm $srv_install | ||||||
|   [ -f $srv_remove ] && rm $srv_remove |   [ -f $srv_remove ] && rm $srv_remove | ||||||
|   [ -f $stats_file ] && rm $stats_file |   [ -f $stats_file ] && rm $stats_file | ||||||
|   [ -f $service_file ] && rm $service_file |  | ||||||
| 
 |  | ||||||
|   # reload systemd daemon |  | ||||||
|   /usr/bin/systemctl daemon-reload |  | ||||||
| 
 | 
 | ||||||
|   separator |   separator | ||||||
|   echo -e "\nauto-cpufreq tool and all its supporting files successfully removed." |   echo -e "\nauto-cpufreq tool and all its supporting files successfully removed." | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user