ダ
Size: a a a
ダ
A
A
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
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
A
В
ダ
A
A
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
A