diff --git a/bot.sh b/bot.sh index 4b4f742..f7f1d55 100755 --- a/bot.sh +++ b/bot.sh @@ -1,5 +1,8 @@ #!/bin/bash -[ "${1}" == "stop" ] && kill -SIGTERM "$(cat /tmp/tpdnsbot.pid)" 2>/dev/null && exit 0 +[ "${1}" == "stop" ] && { + kill -SIGTERM "$(cat /tmp/tpdnsbot.pid)" 2>/dev/null + exit 0 +} printf "%s" "${$}" > /tmp/tpdnsbot.pid api_url="https://api.telegram.org/bot${TELEGRAM_DNS_TOKEN}/"