diff options
| -rw-r--r-- | README.md | 3 | ||||
| -rwxr-xr-x | bot.zsh | 9 |
2 files changed, 9 insertions, 3 deletions
@@ -53,7 +53,8 @@ For distribution specific installation commands follow [command-not-found](https ## Deployment -It is highly recommended to run it with an empty environment to avoid variable conflict: `env -i ./bot.zsh` or `env -i PATH="${PATH}" ./bot.zsh` for Termux. +Usage: `./bot.zsh [options] [token]` + For better performance, it is recommended to use a locally deployed [Telegram Bot API](https://github.com/tdlib/telegram-bot-api) server. ### Available options @@ -3,8 +3,13 @@ # Copyright (C) 2024-2025 Maria Lisina # Copyright (C) 2024-2025 Danil Lisin # SPDX-License-Identifier: Apache-2.0 -# -# Run this software with `env -i` to avoid variable conflict + +if [[ ${__bot_noenv:-0} -eq 0 ]] +then + trap 'wait && exit 0' INT TERM + env -i PATH="${PATH}" __bot_noenv=1 "${0}" ${@} + exit ${?} +fi set -e umask 77 |
