-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·54 lines (46 loc) · 1.31 KB
/
Copy pathuninstall.sh
File metadata and controls
executable file
·54 lines (46 loc) · 1.31 KB
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
#!/bin/bash
clear
echo "Uninstalling Stop Spam"
if [ -e '/etc/init.d/stopspam' ]; then
echo; echo -n "Deleting init service..."
UPDATERC_PATH=`whereis update-rc.d`
if [ "$UPDATERC_PATH" != "update-rc.d:" ]; then
service stopspam stop > /dev/null 2>&1
update-rc.d stopspam remove > /dev/null 2>&1
fi
rm -f /etc/init.d/stopspam
echo -n ".."
echo " (done)"
fi
if [ -e '/usr/lib/systemd/system/stopspam.service' ]; then
echo; echo -n "Deleting systemd service..."
SYSTEMCTL_PATH=`whereis update-rc.d`
if [ "$SYSTEMCTL_PATH" != "systemctl:" ]; then
systemctl stop stopspam > /dev/null 2>&1
systemctl disable stopspam > /dev/null 2>&1
fi
rm -f /usr/lib/systemd/system/stopspam.service
echo -n ".."
echo " (done)"
fi
echo -n "Deleting script files..."
if [ -e '/usr/bin/stopspam' ]; then
rm -f /usr/bin/stopspam
echo -n "."
fi
if [ -d '/usr/share/doc/stopspam' ]; then
rm -rf /usr/share/doc/stopspam
echo -n "."
fi
echo " (done)"
echo -n "Removing man page..."
if [ -e '/usr/share/man/man1/stopspam.1' ]; then
rm -f /usr/share/man/man1/stopspam.1
echo -n "."
fi
if [ -e '/usr/share/man/man1/stopspam.1.gz' ]; then
rm -f /usr/share/man/man1/stopspam.1.gz
echo -n "."
fi
echo " (done)"
echo; echo "Uninstall Complete!"; echo