-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathuninstall
More file actions
executable file
·92 lines (77 loc) · 2.05 KB
/
uninstall
File metadata and controls
executable file
·92 lines (77 loc) · 2.05 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/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===================================="
echo ""
echo -e "\033[41;37m Please backup your mysql data!!!!! \033[0m"
echo ""
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 uninstall opencdn , please wait ......"
char=`get_char`
killall nginx
/etc/init.d/mysql stop
killall mysqld
/usr/local/php/sbin/php-fpm stop
killall php-cgi
rm -rf /usr/local/php
rm -rf /usr/local/nginx
rm -rf /usr/local/mysql
rm -rf /usr/local/zend
chkconfig --del nginx
chkconfig --del php-fpm
chkconfig --del mysql
rm -f /etc/my.cnf
rm -f /etc/init.d/mysql
rm -f /root/vhost.sh
rm -f /root/lnmpd
rm -f /root/bin/rsync.sh
service opencdn stop
chkconfig --del opencdn
rm -f /etc/init.d/opencdn
rm -f /etc/opencdn/opencdn.conf
rm -rf /etc/opencdn/
crontab -r
#remove opencdn resources
rm -rf /home/wwwroot/opencdn/
rm -rf /home/wwwroot/phpmyadmin/
rm -rf /home/wwwroot/conf_rsync
rm -rf /home/wwwroot/ocdn
rm -rf /home/wwwroot/
rm -rf /home/wwwlogs
rm -rf /home/logs
#remove syslog-ng
service syslog-ng stop
yum -y remove syslog-ng
rm -rf /etc/syslog-ng/
rm -f /home/sys_info.pipe
rm -f /home/node_url.pipe
#remove awstats
#rm -rf /usr/local/awstats/
#remove rsync
yum -y remove rsync
rm -f /etc/rsyncd.pwd
rm -f /root/bin/rsync.sh
rm -rf /usr/local/opencdn/
#remove logs
rm -rf /var/log/opencdn