-
Notifications
You must be signed in to change notification settings - Fork 98
/
Copy pathall.stop.delete.tmp.sh
executable file
·73 lines (60 loc) · 1.76 KB
/
all.stop.delete.tmp.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
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
#!/usr/bin/env bash
DIR=$(cd $(dirname $0); pwd)
echo "k8s 一键快速 部署"
echo " "
echo " "
echo "k8s 一键快速 部署 开发环境 By fox"
echo " "
echo " "
echo " "
echo " "
echo " "
echo -e "\033[31m下面将执行删除操作,你确认要删除 ?\033[0m"
echo -e "\033[31m下面将执行删除操作,你确认要删除 ?\033[0m"
echo -e "\033[31m下面将执行删除操作,你确认要删除 ?\033[0m"
echo -e "\033[31m下面将执行删除操作,你确认要删除 ?\033[0m"
echo -e "\033[31m下面将执行删除操作,你确认要删除 ?\033[0m"
echo -e "\033[31m下面将执行删除操作,你确认要删除 ?\033[0m"
echo -e "\033[31m 删除 所有容器生成的本地文件 \033[0m"
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 "任意键继续,如果不需要继续执行删除操作,那么请 关闭终端"
char=`get_char`;
echo -e "删除条件:\033[31m all \033[0m"
echo ""
echo "all:表示全部删除,确认执行删除"
#stty erase ^h
stty erase ^?
read -p "请输入删除条件: " INPUT
if [ x$INPUT == x"all" ]; then
echo "开始执行删除"
echo "开始执行删除"
rm -rf ${DIR}/mariadb/data/*
rm -rf ${DIR}/elasticsearch/data/*
rm -rf ${DIR}/elasticsearch/logs/*
rm -rf ${DIR}/nacos/logs-nacos/*
rm -rf ${DIR}/redis/data/*
rm -rf ${DIR}/redis/data/*
rm -rf ${DIR}/rocketmq/logs/*
rm -rf ${DIR}/rocketmq/logs-b/*
rm -rf ${DIR}/rocketmq/logs-b-s/*
rm -rf ${DIR}/rocketmq/logs-ui/*
rm -rf ${DIR}/rocketmq/store/*
rm -rf ${DIR}/rocketmq/store-b/*
rm -rf ${DIR}/rocketmq/store-b-s/*
echo "删除完成"
echo "删除完成"
echo "删除完成"
echo "删除完成"
else
echo "终止删除"
exit
fi