From d75d8dc2b1ddee31f49788145194a72f3c928a89 Mon Sep 17 00:00:00 2001 From: Adnan Hodzic Date: Tue, 7 Jan 2020 18:46:51 +0100 Subject: [PATCH] deploy unified (across distirbutions) systemd unit file (issue: #12) --- auto-cpufreq.py | 3 --- scripts/auto-cpufreq-install.sh | 3 +++ scripts/auto-cpufreq-remove.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/auto-cpufreq.py b/auto-cpufreq.py index 0e527cd..8dc5c8e 100755 --- a/auto-cpufreq.py +++ b/auto-cpufreq.py @@ -76,9 +76,6 @@ def deploy(): print("\n* Deploy auto-cpufreq remove script") os.system("cp scripts/auto-cpufreq-remove.sh /usr/bin/auto-cpufreq-remove") - print("\n* Deploy auto-cpufreq systemd unit file") - os.system("cp scripts/auto-cpufreq.service /usr/lib/systemd/system/auto-cpufreq.service") - # run auto-cpufreq daemon deploy script s.call("/usr/bin/auto-cpufreq-install", shell=True) diff --git a/scripts/auto-cpufreq-install.sh b/scripts/auto-cpufreq-install.sh index caade09..bb586fa 100755 --- a/scripts/auto-cpufreq-install.sh +++ b/scripts/auto-cpufreq-install.sh @@ -14,6 +14,9 @@ fi # this is needed on SELinux enabled systems (see also ConditionPathExists in .service) touch /var/log/auto-cpufreq.log +echo -e "\n* Deploy auto-cpufreq systemd unit file" +cp scripts/auto-cpufreq.service /etc/systemd/system/auto-cpufreq.service + echo -e "\n* Reloading systemd manager configuration" systemctl daemon-reload diff --git a/scripts/auto-cpufreq-remove.sh b/scripts/auto-cpufreq-remove.sh index a0157a4..2a248fd 100755 --- a/scripts/auto-cpufreq-remove.sh +++ b/scripts/auto-cpufreq-remove.sh @@ -18,7 +18,7 @@ echo -e "\n* Disabling auto-cpufreq daemon (systemd) at boot" systemctl disable auto-cpufreq echo -e "\n* Removing auto-cpufreq daemon (systemd) unit file" -rm /usr/lib/systemd/system/auto-cpufreq.service +rm /etc/systemd/system/auto-cpufreq.service echo -e "\n* Reloading systemd manager configuration" systemctl daemon-reload