-
Notifications
You must be signed in to change notification settings - Fork 38
Expand file tree
/
Copy pathuninstall.sh
More file actions
executable file
·46 lines (37 loc) · 949 Bytes
/
uninstall.sh
File metadata and controls
executable file
·46 lines (37 loc) · 949 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
41
42
43
44
45
46
#!/bin/bash
# Function : uninstall opencdn node
# author : firefoxbug
# E-Mail : wanghuafire@gmail.com
# Blog : www.firefoxbug.net
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 "Press any key to start uninstall opencdn , please wait ......"
char=`get_char`
service nginx stop
service opencdn stop
OPENCDN_PATH="/usr/local/opencdn"
NGX_PATH="/usr/local/nginx"
OPENCDN_LOG_PATH="/var/log/opencdn"
chkconfig --del opencdn
chkconfig --del nginx
rm -rf ${OPENCDN_LOG_PATH}
rm -rf ${NGX_PATH}
rm -rf ${OPENCDN_PATH}
rm -f /etc/init.d/opencdn
rm -f /etc/init.d/nginx
rm -f /var/run/nginx.pid
rm -f /var/run/opencdn.pid