-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathrun
More file actions
89 lines (80 loc) · 3.45 KB
/
run
File metadata and controls
89 lines (80 loc) · 3.45 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
#!/bin/bash
# ▀█████████▄ ▄██████▄ ▄████████ ▄████████
# ███ ███ ███ ███ ███ ███ ███ ███
# ███ ███ ███ ███ ███ █▀ ███ █▀
# ▄███▄▄▄██▀ ███ ███ ███ ███
# ▀▀███▀▀▀██▄ ███ ███ ▀███████████ ▀███████████ ¦ Dev : @TH3BOSS
# ███ ██▄ ███ ███ ███ ███ ¦ Dev : @OMMMM
# ███ ███ ███ ███ ▄█ ███ ▄█ ███
# ▄█████████▀ ▀██████▀ ▄████████▀ ▄████████▀ ¦ Source TH3BOSS BY @TH3BS
#---------------------------------------------------------------------
cd $(cd $(dirname $0); pwd)
RED='\033[0;31m'
SMAY='\033[0;36m'
GREEN='\033[0;32m'
Yellow='\033[0;33m'
LSAMAY='\033[01;49m'
WHITB='\033[01;90m'
WHITEC='\033[01;91m'
CNIL='\033[0m'
Version=`lsb_release -rs | cut -f1 -d"."`
if [ "$Version" == "18" ];then
echo -e "${GREEN}
▀█████████▄ ▄██████▄ ▄████████ ▄████████
███ ███ ███ ███ ███ ███ ███ ███
███ ███ ███ ███ ███ █▀ ███ █▀
▄███▄▄▄██▀ ███ ███ ███ ███
▀▀███▀▀▀██▄ ███ ███ ▀███████████ ▀███████████ ¦ Dev : @TH3BOSS
███ ██▄ ███ ███ ███ ███ ¦ Dev : @OMMMM
███ ███ ███ ███ ▄█ ███ ▄█ ███ ¦ Source TH3BOSS
▄█████████▀ ▀██████▀ ▄████████▀ ▄████████▀ ¦ BY @TH3BS
---------------------------------------------------------------------${CNIL}"
echo -e "${RED}| للاسف لايمكنك تنصيب السورس ع نظام اوبنتو {${Version}} يجب ان يكون على اصدار اقل مثلا ${SMAY}14 او 16
${CNIL}";
echo -e "${RED}| Sorry Canot install Source on Ubuntu {${Version}} Please install system To Ubuntu ${SMAY}14 or 16 ${RED} For Run The Source Th3Boss
${CNIL}";
exit;
fi
if [ ! -f "./TG" ]; then
echo -e "${RED}
¦
¦ CAUTION:${WHITB} Your Not Dwonload TG .
¦ NOW I Run File ${Yellow}./run${WHITB} To install ${SMAY}Source TH3BOSS${CNIL} . \n
\n\n"
chmod +x ./ins
./ins
exit;
fi
if [ ! -f "./inc/Token.txt" ]; then
echo -e "${RED}
¦
¦ CAUTION:${WHITB} Your Token Bot Not Found .
¦ NOW I Run File ${SMAY}./RUN.lua${WHITB} To Enter Data For You Bot${CNIL}. \n
\n\n"
lua ./inc/Run.lua
exit;
else
TOKEN=`cat ./inc/Token.txt`
BOTID=`echo $TOKEN | cut -f1 -d":"`
Sudo=$(redis-cli get ${BOTID}:SUDO_ID:)
if [[ $Sudo == "" ]]; then
rm -fr ./inc/Token.txt
lua ./inc/Run.lua
exit;
fi
fi
chmod +x ./TG
if [ "$1" == "R" ]; then
while true; do
sleep 1s
sudo rm -fr ~/.telegram-cli
./TG -s ./inc/Run.lua --bot=$TOKEN
done
else
if ! screen -list | grep -q "boss"; then
screen -S boss ./run R
else
screen -X -S boss quit
screen -S boss ./run R
fi
fi