forked from 2ri4eUI/CFW-BOT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
73 lines (58 loc) · 2.72 KB
/
install.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
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m'
CHECK_MARK='✅'
WARNING='⚠️'
ROCKET='🚀'
ARROW='⬇️'
DOOR='🚪'
WALL='🧱'
echo -e "${GREEN}┌──────────────────────────────┐${NC}"
echo -e "${GREEN}│${NC}███ ███ █┼┼┼█ ┼┼ ██▄ ███ ███${GREEN}${NC}"
echo -e "${GREEN}│${NC}█┼┼ █▄┼ █┼█┼█ ┼┼ █▄█ █┼█ ┼█┼${GREEN}${NC}"
echo -e "${GREEN}│${NC}███ █┼┼ █▄█▄█ ┼┼ █▄█ █▄█ ┼█┼${GREEN}${NC}"
echo -e "${GREEN}│${NC}by 2ri4eUI${WALL}${DOOR}${WALL}${GREEN}${NC}"
echo -e "${GREEN}└──────────────────────────────┘${NC}"
echo -e "${YELLOW}Cloning CFW-BOT Repo ${NC}"
git clone https://github.com/2ri4eUI/CFW-BOT.git
cd CFW-BOT
echo -e "${YELLOW}Loading requirements...${NC}"
if [ -f "dos2unix.py" ]; then
python3 dos2unix.py
echo -e "${GREEN}${CHECK_MARK} dos2unix.py executed${NC}"
fi
if [ -f "requirement.sh" ]; then
python3 dos2unix.py requirement.sh
echo -e "${GREEN}${CHECK_MARK} requirement.sh converted to UNIX format${NC}"
chmod +x requirement.sh
echo -e "${YELLOW}Installing requirements: ${NC}\c"
logfile="requirements.log"
touch "$logfile"
sleep 5
./requirement.sh &> "$logfile" &
while true; do
if grep -q "Wrangler installed successfully." "$logfile"; then
break
fi
echo -e -n "${GREEN}.${NC}"
sleep 10
done
echo -e " ${GREEN}${CHECK_MARK}${NC}"
fi
clear
echo -e "${GREEN}┌──────────────────────────────┐${NC}"
echo -e "${GREEN}│${NC}███ ███ █┼┼┼█ ┼┼ ██▄ ███ ███${GREEN}${NC}"
echo -e "${GREEN}│${NC}█┼┼ █▄┼ █┼█┼█ ┼┼ █▄█ █┼█ ┼█┼${GREEN}${NC}"
echo -e "${GREEN}│${NC}███ █┼┼ █▄█▄█ ┼┼ █▄█ █▄█ ┼█┼${GREEN}${NC}"
echo -e "${GREEN}│${NC}by 2ri4eUI${WALL}${DOOR}${WALL}${GREEN}${NC}"
echo -e "${GREEN}└──────────────────────────────┘${NC}"
echo -e "${GREEN}${CHECK_MARK} Requirements installed Successfully! ${NC}"
echo -e "${GREEN}${CHECK_MARK} Now You Can Add 1.CF API TOKEN 2.Telegram Bot Token 3.CF Account ID 4.Admin UserID${NC}"
echo -e "${YELLOW}${WARNING} Pay Attention To Their Order ${NC}"
echo -e "${YELLOW}${ARROW} Use CTRL+V to Paste ${ARROW}${NC}"
python3 install.py
echo -e "${GREEN}${ROCKET} Installation complete${NC}"
echo -e "${GREEN}${ROCKET} Starting CFW-BOT${NC}"
python3 cfw.py