-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathuninstall
More file actions
executable file
·64 lines (54 loc) · 1.72 KB
/
uninstall
File metadata and controls
executable file
·64 lines (54 loc) · 1.72 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
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
#opencdn unistall
#author : firefoxbug
user="`whoami`"
if [ "$user" != "root" ];then
echo "execute $0 with root !!! "
exit 0;
fi
echo "==========================OpenCDN===================================="
echo "* *"
echo "* *"
echo "* Welcome To OpenCDN *"
echo "* *"
echo "* *"
echo "==========================OpenCDN===================================="
get_char()
{
SAVEDSTTY=`stty -g`
stty -echo
stty cbreak
dd if=/dev/tty bs=1 count=1 2> /dev/null
stty -raw
stty echo
stty $SAVEDSTTY
}
echo ""
echo "Press any key to start install opencdn , please wait ......"
char=`get_char`
service opencdn stop
chkconfig --del opencdn
rm -rf /etc/opencdn/
crontab -r
service nginx stop
#remove nginx
echo "remove nginx"
chkconfig --del nginx
rm -rf /tmp/tcmalloc /usr/local/nginx /etc/init.d/nginx /home/cache /home/temp
rm -f /var/log/nginxmon.log
echo "remove rsync"
yum -y remove rsync
rm -rf /etc/rsyncd.conf
rm -f /etc/rsyncd.pwd
rm -rf /usr/bin/rsync
kill -9 `ps aux | grep "nginxmon" | awk '{print $2}'`
kill -9 `ps aux | grep "search_url" | awk '{print $2}'`
kill -9 `ps aux | grep "send_info" | awk '{print $2}'`
kill -9 `ps aux | grep "inotifywait" | awk '{print $2}'`
sed -i '/\/usr\/local\/nginx\/sbin\/nginxmon.sh/D' /etc/rc.local
sed -i '/search_url/D' /etc/rc.local
sed -i '/send_info/D' /etc/rc.local
#remove syslog
yum -y remove syslog-ng
rm -rf /etc/syslog-ng/
rm -f /home/sys_info.pipe /home/node_url.pipe