From 166ee8ce808653e9cdc53b49eee3f9c6a5ef5b9b Mon Sep 17 00:00:00 2001 From: celso Date: Sun, 26 Mar 2023 09:47:14 -0300 Subject: [PATCH] fixed bot not launching if tmpdir had to be made --- bot.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bot.sh b/bot.sh index dbd6a8f..94384e9 100755 --- a/bot.sh +++ b/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"