mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-28 12:50:44 +00:00
output bot validation result on tty only
This commit is contained in:
parent
a901cc78d4
commit
f32833ccf9
@ -11,7 +11,7 @@
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
#
|
||||
#### $$VERSION$$ v0.98-dev-2-geb4fa68
|
||||
#### $$VERSION$$ v0.98-dev-3-ga901cc7
|
||||
#
|
||||
# Exit Codes:
|
||||
# - 0 sucess (hopefully)
|
||||
@ -939,7 +939,7 @@ if [ "${SOURCE}" != "yes" ]; then
|
||||
ME="$(getBotName)"
|
||||
if [ -n "${ME}" ]; then
|
||||
# ok we have a connection an got botname, save it
|
||||
echo -e "${GREY}Bottoken is valid ...${NC}"
|
||||
[ -n "${CLEAR}" ] && echo -e "${GREY}Bottoken is valid ...${NC}"
|
||||
jssh_updateKeyDB "botname" "${ME}" "${BOTDATABASE}"
|
||||
rm -f "${BOTDATABASE}.jssh.flock"
|
||||
else
|
||||
@ -950,7 +950,7 @@ if [ "${SOURCE}" != "yes" ]; then
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
printf "Bot Name: %s\n" "${ME}"
|
||||
[ -n "${CLEAR}" ] && printf "Bot Name: %s\n" "${ME}"
|
||||
SESSION="${ME:-_bot}-startbot"
|
||||
BOTPID="$(proclist "${SESSION}")"
|
||||
[ "$1" = "botname" ] && exit
|
||||
|
Loading…
Reference in New Issue
Block a user