-
Notifications
You must be signed in to change notification settings - Fork 3
/
uninstall.sh
executable file
·54 lines (45 loc) · 1.05 KB
/
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
if [[ $(id -u) != 0 ]]
then
echo "Please, run this script as root (using sudo for example)"
exit 1
fi
systemctl stop asus_fliplock
if [[ $? != 0 ]]
then
echo "asus_fliplock.service cannot be stopped correctly..."
exit 1
fi
systemctl disable asus_fliplock
if [[ $? != 0 ]]
then
echo "asus_fliplock.service cannot be disabled correctly..."
exit 1
fi
rm -f /lib/systemd/system/asus_fliplock.service
if [[ $? != 0 ]]
then
echo "/lib/systemd/system/asus_fliplock.service cannot be removed correctly..."
exit 1
fi
rm -rf /usr/share/asus_fliplock-driver/
if [[ $? != 0 ]]
then
echo "/usr/share/asus_fliplock-driver/ cannot be removed correctly..."
exit 1
fi
rm -rf /var/log/asus_fliplock-driver
if [[ $? != 0 ]]
then
echo "/var/log/asus_fliplock-driver cannot be removed correctly..."
exit 1
fi
systemctl daemon-reload
if [[ $? != 0 ]]; then
echo "Something went wrong when was called systemctl daemon reload"
exit 1
else
echo "Systemctl daemon realod called succesfully"
fi
echo "Asus fliplock python driver uninstalled"
exit 0