-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathremove.sh
More file actions
40 lines (37 loc) · 913 Bytes
/
Copy pathremove.sh
File metadata and controls
40 lines (37 loc) · 913 Bytes
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
#!/bin/bash
usage(){
echo ""
echo " Usage: $0 [ -h | --help ]"
echo ""
echo " Este script desinstala o monitoramento de temperatura"
echo " do Water Cooler Rise Mode Aura Ice do sistema."
echo ""
}
while [[ $# -gt 0 ]]; do
case $1 in
-h|--help)
usage
exit 0
;;
esac
done
if [[ $UID -ne 0 ]]; then
echo ""
echo " ERRO: Este script deve ser executado como root" 1>&2
echo ""
exit 1
else
echo ""
echo " INFO: Desinstalando o Water Cooler Rise Mode Aura Ice:"
echo " Parando serviço..."
systemctl stop risemode.service 2>/dev/null
echo " Desabilitando serviço..."
systemctl disable risemode.service 2>/dev/null
echo " Removendo arquivos..."
rm -f /lib/systemd/system/risemode.service 2>/dev/null
rm -f /usr/bin/risemode 2>/dev/null
echo ""
echo " Water Cooler Rise Mode Aura Ice desinstalado com sucesso!"
echo ""
exit 0
fi