Merge branch 'jpnt-master'
This commit is contained in:
commit
33b5c4ddfb
|
@ -132,6 +132,22 @@ function tool_install {
|
||||||
separator
|
separator
|
||||||
complete_msg
|
complete_msg
|
||||||
separator
|
separator
|
||||||
|
# Void Linux
|
||||||
|
elif [ -f /etc/os-release ] && eval "$(cat /etc/os-release)" && [[ $ID == "void"* ]]; then
|
||||||
|
separator
|
||||||
|
echo -e "\nDetected Void Linux ditribution\n"
|
||||||
|
separator
|
||||||
|
echo -e "\nSetting up Python environment\n"
|
||||||
|
xbps-install -Suy python3 python3-pip python3-devel python3-setuptools base-devel dmidecode
|
||||||
|
separator
|
||||||
|
echo -e "\nInstalling necessary Python packages\n"
|
||||||
|
pip_pkg_install
|
||||||
|
separator
|
||||||
|
echo -e "\ninstalling auto-cpufreq tool\n"
|
||||||
|
install
|
||||||
|
separator
|
||||||
|
complete_msg
|
||||||
|
separator
|
||||||
# Other
|
# Other
|
||||||
else
|
else
|
||||||
separator
|
separator
|
||||||
|
|
|
@ -11,17 +11,39 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
echo -e "\n* Reloading systemd manager configuration"
|
# Install script for runit
|
||||||
systemctl daemon-reload
|
if [ -f /etc/os-release ] && eval "$(cat /etc/os-release)" && [[ $ID == "void"* ]]; then
|
||||||
|
echo -e "\n* Deploy auto-cpufreq runit unit file"
|
||||||
|
mkdir /etc/sv/auto-cpufreq
|
||||||
|
cp /usr/local/share/auto-cpufreq/scripts/run /etc/sv/auto-cpufreq
|
||||||
|
chmod +x /etc/sv/auto-cpufreq/run
|
||||||
|
|
||||||
echo -e "\n* Stopping auto-cpufreq daemon (systemd) service"
|
echo -e "\n* Creating symbolic link (/var/service/auto-cpufreq -> /etc/sv/auto-cpufreq)"
|
||||||
systemctl stop auto-cpufreq
|
ln -s /etc/sv/auto-cpufreq /var/service
|
||||||
|
|
||||||
echo -e "\n* Starting auto-cpufreq daemon (systemd) service"
|
echo -e "\n* Stopping auto-cpufreq daemon (runit) service"
|
||||||
systemctl start auto-cpufreq
|
sv stop auto-cpufreq
|
||||||
|
|
||||||
echo -e "\n* Enabling auto-cpufreq daemon (systemd) service at boot"
|
echo -e "\n* Starting auto-cpufreq daemon (runit) service"
|
||||||
systemctl enable auto-cpufreq
|
sv start auto-cpufreq
|
||||||
|
sv up auto-cpufreq
|
||||||
|
|
||||||
|
|
||||||
|
# Install script for systemd
|
||||||
|
else
|
||||||
|
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
|
||||||
|
|
||||||
|
echo -e "\n* Reloading systemd manager configuration"
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
echo -e "\n* Stopping auto-cpufreq daemon (systemd) service"
|
||||||
|
systemctl stop auto-cpufreq
|
||||||
|
|
||||||
|
echo -e "\n* Starting auto-cpufreq daemon (systemd) service"
|
||||||
|
systemctl start auto-cpufreq
|
||||||
|
|
||||||
|
echo -e "\n* Enabling auto-cpufreq daemon (systemd) service at boot"
|
||||||
|
systemctl enable auto-cpufreq
|
||||||
|
fi
|
||||||
|
|
|
@ -11,17 +11,28 @@ then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\n* Stopping auto-cpufreq daemon (systemd) service"
|
|
||||||
systemctl stop auto-cpufreq
|
|
||||||
|
|
||||||
echo -e "\n* Disabling auto-cpufreq daemon (systemd) at boot"
|
if [ -f /etc/os-release ] && eval "$(cat /etc/os-release)" && [[ $ID == "void"* ]]; then
|
||||||
systemctl disable auto-cpufreq
|
echo -e "\n* Stopping auto-cpufreq daemon (runit) service"
|
||||||
|
sv stop auto-cpufreq
|
||||||
|
|
||||||
echo -e "\n* Removing auto-cpufreq daemon (systemd) unit file"
|
echo -e "\n* Removing auto-cpufreq daemon (runit) unit files"
|
||||||
rm /etc/systemd/system/auto-cpufreq.service
|
rm -rf /etc/sv/auto-cpufreq
|
||||||
|
rm -rf /var/service/auto-cpufreq
|
||||||
|
|
||||||
echo -e "\n* Reloading systemd manager configuration"
|
else
|
||||||
systemctl daemon-reload
|
echo -e "\n* Stopping auto-cpufreq daemon (systemd) service"
|
||||||
|
systemctl stop auto-cpufreq
|
||||||
|
|
||||||
echo -e "reset failed"
|
echo -e "\n* Disabling auto-cpufreq daemon (systemd) at boot"
|
||||||
systemctl reset-failed
|
systemctl disable auto-cpufreq
|
||||||
|
|
||||||
|
echo -e "\n* Removing auto-cpufreq daemon (systemd) unit file"
|
||||||
|
rm /etc/systemd/system/auto-cpufreq.service
|
||||||
|
|
||||||
|
echo -e "\n* Reloading systemd manager configuration"
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
echo -e "reset failed"
|
||||||
|
systemctl reset-failed
|
||||||
|
fi
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh
|
||||||
|
exec /usr/bin/auto-cpufreq --daemon
|
Loading…
Reference in New Issue