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