forked from jamsinclair/opifancontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
35 lines (30 loc) · 1.3 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
if [ ! -f /etc/debian_version ]; then
echo "This script is currently only for Debian based systems."
exit 1
fi
echo "Installing opifancontrol..."
echo ""
curl -s https://raw.githubusercontent.com/jamsinclair/opifancontrol/main/opifancontrol.sh -o /usr/local/bin/opifancontrol.sh
chmod +x /usr/local/bin/opifancontrol.sh
if [ -f "/etc/opifancontrol.conf" ]; then
echo "Configuration file already exists at /etc/opifancontrol.conf. Skipping..."
else
curl -s https://raw.githubusercontent.com/jamsinclair/opifancontrol/main/opifancontrol.conf -o /etc/opifancontrol.conf
fi
curl -s https://raw.githubusercontent.com/jamsinclair/opifancontrol/main/opifancontrol.service -o /etc/systemd/system/opifancontrol.service
echo "Finished installing opifancontrol!"
echo ""
echo "Configure opifancontrol by editing /etc/opifancontrol.conf"
echo ""
echo Run the following command to enable the service to start on boot:
echo " systemctl enable opifancontrol.service"
echo ""
echo Run the following command to start the service:
echo " systemctl start opifancontrol.service"
echo ""
echo Run the following command to check the status of the service:
echo " systemctl status opifancontrol.service"
echo ""
echo Run the following command to stop the service:
echo " systemctl stop opifancontrol.service"