summarylogtreecommitdiffstats
path: root/auto-cpufreq.install
diff options
context:
space:
mode:
authorbenezen2021-12-08 17:06:34 +0900
committerbenezen2021-12-08 17:06:34 +0900
commita19cd6003267e11d6d5da738d3e2d046eba2fa4b (patch)
tree2c548ce93ba9b57d866caa45ab0fa7720612987f /auto-cpufreq.install
downloadaur-a19cd6003267e11d6d5da738d3e2d046eba2fa4b.tar.gz
auto-cpufreq-git-temp-non-systemd-gnome-power
Diffstat (limited to 'auto-cpufreq.install')
-rw-r--r--auto-cpufreq.install35
1 files changed, 35 insertions, 0 deletions
diff --git a/auto-cpufreq.install b/auto-cpufreq.install
new file mode 100644
index 000000000000..e09d2087ee44
--- /dev/null
+++ b/auto-cpufreq.install
@@ -0,0 +1,35 @@
+post_install() {
+ # This is needed on SELinux enabled systems (see also ConditionPathExists in .service)
+ touch /var/log/auto-cpufreq.log
+
+ echo ''
+ echo 'Enable auto-cpufreq daemon service at boot:'
+ echo 'systemctl enable --now auto-cpufreq'
+ echo ''
+ echo 'To view live log, run:'
+ echo 'auto-cpufreq --log'
+ echo ''
+}
+
+post_upgrade() {
+ echo ''
+ echo 'Reload systemd manager configuration:'
+ echo 'systemctl daemon-reload'
+ echo ''
+ echo 'Restart auto-cpufreq daemon service:'
+ echo 'systemctl restart auto-cpufreq'
+ echo ''
+}
+
+post_remove() {
+ # Remove auto-cpufreq log file
+ rm /var/log/auto-cpufreq.log
+
+ # Remove auto-cpufreq's cpufreqctl binary
+ rm /usr/bin/cpufreqctl
+
+ # Restore original cpufreqctl binary if backup was made
+ if [ -f "/usr/bin/cpufreqctl.auto-cpufreq.bak" ]; then
+ mv /usr/bin/cpufreqctl.auto-cpufreq.bak /usr/bin/cpufreqctl
+ fi
+}