fixed bot not launching if tmpdir had to be made
This commit is contained in:
parent
77b2ffaab8
commit
166ee8ce80
6
bot.sh
6
bot.sh
|
@ -9,8 +9,10 @@ api_url="https://api.telegram.org/bot${TELEGRAM_DNS_TOKEN}/"
|
|||
botid="6040192441"
|
||||
bot_tmpdir="/tmp/tpdnsbot/"
|
||||
[ -d "${bot_tmpdir}" ] || {
|
||||
mkdir "${bot_tmpdir}" || printf "error: can't write to /tmp\n"
|
||||
exit 2
|
||||
mkdir "${bot_tmpdir}" || {
|
||||
printf "error: can't write to /tmp\n"
|
||||
exit 2
|
||||
}
|
||||
}
|
||||
|
||||
exec 2>"${bot_tmpdir}/error.log"
|
||||
|
|
Loading…
Reference in New Issue