ダ
Size: a a a
ダ
ダ
ダ
A
ダ
ダ
A
telebot.apihelper.RETRY_ON_ERROR = True
bot.polling()
A
A
cat /root/ttdlbot/restart.sh
0
#!/bin/sh
#-*- coding: utf-8 -*-
# Exit the script on errors:
#~ set -e
#~ trap 'echo "$0 FAILED at line ${LINENO}"' ERR
# Catch unitialized variables:
set -u
bot_folder="/root/ttdlbot"
while true; do
cd ${bot_folder}
python3 main.py
if [ -f "exit" ]; then
rm "exit"
exit 0
fi
#~ sleep 11m
read -n 1 -t 15
done
🚲U
cat /root/ttdlbot/restart.sh
0
#!/bin/sh
#-*- coding: utf-8 -*-
# Exit the script on errors:
#~ set -e
#~ trap 'echo "$0 FAILED at line ${LINENO}"' ERR
# Catch unitialized variables:
set -u
bot_folder="/root/ttdlbot"
while true; do
cd ${bot_folder}
python3 main.py
if [ -f "exit" ]; then
rm "exit"
exit 0
fi
#~ sleep 11m
read -n 1 -t 15
done
A
A
cat /root/ttdlbot/restart.sh
0
#!/bin/sh
#-*- coding: utf-8 -*-
# Exit the script on errors:
#~ set -e
#~ trap 'echo "$0 FAILED at line ${LINENO}"' ERR
# Catch unitialized variables:
set -u
bot_folder="/root/ttdlbot"
while true; do
cd ${bot_folder}
python3 main.py
if [ -f "exit" ]; then
rm "exit"
exit 0
fi
#~ sleep 11m
read -n 1 -t 15
done
ダ
@bot.poll_answer_handler()
def pola(polle):
print(polle)
ダ
{'poll_id': '5438175770721648646', 'user': {'id': 384161491, 'is_bot': False, 'first_name': 'Seruios', 'username': 'Seruios', 'last_name': None, 'language_code': 'ru'}, 'options_ids': [0]}
ダ
ダ
ダ
Ej
A
cat /lib/systemd/system/ttdlbot.service
0
[Unit]
Description=@ttdlbot
After=multi-user.target
[Service]
Type=idle
ExecStart=/root/ttdlbot/restart.sh
[Install]
WantedBy=multi-user.target
ダ