From d7e10bc9eb332a9c5eb09cb319446d582939b8a7 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"