-
Notifications
You must be signed in to change notification settings - Fork 5
/
myfire-uninstall.sh
executable file
·42 lines (33 loc) · 1.42 KB
/
myfire-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
#!/bin/bash
if [ ! "$(id -u)" = "0" ] ; then
echo "You need root permissions."
exit 1
fi
args="$@"
if [ "$args" = "" ] ; then
cmd="$0"
else
cmd="$0 $args"
fi
echo "$(date) - *** '$cmd' BEGIN ***" | tee -a /var/log/myfire.log
echo "$(date) - Uninstalling MyFire version '0.1'." | tee -a /var/log/myfire.log
unlink /usr/sbin/myfire-black >/dev/null 2>&1
unlink /usr/sbin/myfire-download-badips >/dev/null 2>&1
unlink /usr/sbin/myfire-download-torips >/dev/null 2>&1
unlink /usr/sbin/myfire-examine-auth >/dev/null 2>&1
unlink /usr/sbin/myfire-green >/dev/null 2>&1
unlink /usr/sbin/myfire-list >/dev/null 2>&1
unlink /usr/sbin/myfire-process >/dev/null 2>&1
unlink /usr/sbin/myfire-rebuild >/dev/null 2>&1
unlink /usr/sbin/myfire-report-badip >/dev/null 2>&1
unlink /usr/sbin/myfire-reset >/dev/null 2>&1
unlink /usr/sbin/myfire-uninstall >/dev/null 2>&1
unlink /usr/sbin/myfire-white >/dev/null 2>&1
unlink /usr/sbin/myfire >/dev/null 2>&1
echo "$(date) - Removed symbolic links from directory '/usr/sbin'." | tee -a /var/log/myfire.log
rm -rf /var/lib/myfire
rm -rf /opt/myfire
echo "$(date) - Operational directories have been removed." | tee -a /var/log/myfire.log
echo "$(date) - You need to delete manually the log file '/var/log/myfire.log'." | tee -a /var/log/myfire.log
echo "$(date) - MyFire version '0.1' has been uninstalled." | tee -a /var/log/myfire.log
echo "$(date) - *** '$cmd' END ***" | tee -a /var/log/myfire.log