-
Notifications
You must be signed in to change notification settings - Fork 0
/
uninstall.sh
36 lines (25 loc) · 918 Bytes
/
uninstall.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
36
#!/usr/bin/env bash
# uninstall script
sudo systemctl stop temp2fan.service
sudo systemctl disable temp2fan.service
sudo systemctl stop temp2fan.timer
sudo systemctl disable temp2fan.timer
echo "Stop and disable service and timer.....done"
sudo rm /etc/systemd/system/temp2fan.service
sudo rm /etc/systemd/system/temp2fan.timer
sudo rm /usr/bin/temp2fan-controler.sh
# rm config file
sudo rm /etc/temp2fan.conf
echo "Service, timer and script were deleted.....done"
sudo systemctl daemon-reload
echo "Systemd reload.....done"
# This code will set fans to auto mode.
for fan in /sys/devices/platform/applesmc.768/fan*_manual
do
echo 0 > $fan
done
echo "Fans on automatic mode on.....done"
sudo chmod o-w /sys/devices/platform/applesmc.768/fan*_output
sudo chmod o-w /sys/devices/platform/applesmc.768/fan*_manual
echo "Permission reset to original state.....done"
echo "Uninstallation is complete.....done"