Revert "install service file to proper location; enable and start service (#259)"

This reverts commit af7b92b104.
This commit is contained in:
Adnan Hodzic 2021-10-17 15:49:58 +02:00 committed by GitHub
parent af7b92b104
commit 826a63b3da
1 changed files with 0 additions and 21 deletions

View File

@ -33,25 +33,11 @@ function pip_pkg_install {
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
function install {
python3 setup.py install --record files.txt
mkdir -p /usr/local/share/auto-cpufreq/
cp -r scripts/ /usr/local/share/auto-cpufreq/
install_service_file
start_service
}
function update_service_file {
@ -60,8 +46,6 @@ function update_service_file {
/usr/local/share/auto-cpufreq/scripts/auto-cpufreq.service
}
# First argument is the distro
function detected_distro() {
echo -e "\nDetected $1 distribution"
@ -165,7 +149,6 @@ function tool_remove {
srv_remove="/usr/bin/auto-cpufreq-remove"
stats_file="/var/run/auto-cpufreq.stats"
tool_proc_rm="auto-cpufreq --remove"
service_file="/usr/lib/systemd/system/auto-cpufreq.service"
# stop any running auto-cpufreq argument (daemon/live/monitor)
tool_arg_pids=($(pgrep -f "auto-cpufreq --"))
@ -188,10 +171,6 @@ function tool_remove {
[ -f $srv_install ] && rm $srv_install
[ -f $srv_remove ] && rm $srv_remove
[ -f $stats_file ] && rm $stats_file
[ -f $service_file ] && rm $service_file
# reload systemd daemon
/usr/bin/systemctl daemon-reload
separator
echo -e "\nauto-cpufreq tool and all its supporting files successfully removed."