mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-04-11 00:21:50 +00:00
do not create botconfig on help
This commit is contained in:
parent
75024a1726
commit
11b5aab9b9
@ -11,7 +11,7 @@
|
|||||||
# This file is public domain in the USA and all free countries.
|
# This file is public domain in the USA and all free countries.
|
||||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v0.98-dev-51-gcf536c9
|
#### $$VERSION$$ v0.98-dev-52-g75024a1
|
||||||
#
|
#
|
||||||
# Exit Codes:
|
# Exit Codes:
|
||||||
# - 0 sucess (hopefully)
|
# - 0 sucess (hopefully)
|
||||||
@ -120,7 +120,7 @@ ERRORLOG="${LOGDIR}/ERROR.log"
|
|||||||
UPDATELOG="${LOGDIR}/BASHBOT.log"
|
UPDATELOG="${LOGDIR}/BASHBOT.log"
|
||||||
|
|
||||||
# we assume everthing is already set up correctly if we have TOKEN
|
# we assume everthing is already set up correctly if we have TOKEN
|
||||||
if [ -z "${BOTTOKEN}" ]; then
|
if [[ -z "${BOTTOKEN}" && "${1}" != "help" ]]; then
|
||||||
# BOTCONFIG does not exist, create
|
# BOTCONFIG does not exist, create
|
||||||
[ ! -f "${BOTCONFIG}.jssh" ] &&
|
[ ! -f "${BOTCONFIG}.jssh" ] &&
|
||||||
printf '["bot_config_key"]\t"config_key_value"\n' >"${BOTCONFIG}.jssh"
|
printf '["bot_config_key"]\t"config_key_value"\n' >"${BOTCONFIG}.jssh"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user