From e83f4d443f57e7c41778e13bdbcfe4d6ba6305cf Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Wed, 27 Jan 2021 16:29:58 +0100 Subject: [PATCH] init: finalize external init --- bashbot.sh | 4 ++-- bin/bashbot_init.inc.sh | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index 34b8e46..aa1c81f 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb # 8 - curl/wget missing # 10 - not bash! # -#### $$VERSION$$ v1.35-dev-28-g3f331dc +#### $$VERSION$$ v1.35-dev-29-g0c0dc01 ################################################################## # emmbeded system may claim bash but it is not @@ -1108,7 +1108,7 @@ start_bot() { bot_init() { [ -n "${BASHBOT_HOME}" ] && cd "${BASHBOT_HOME}" || exit 1 # load addons on startup - printf "Initialize modules and addons ...\n" + printf "Initialize addons ...\n" for addons in "${ADDONDIR:-.}"/*.sh ; do # shellcheck source=./modules/aliases.sh [ -r "${addons}" ] && source "${addons}" "init" "$1" diff --git a/bin/bashbot_init.inc.sh b/bin/bashbot_init.inc.sh index 042e9e0..c0a3f39 100644 --- a/bin/bashbot_init.inc.sh +++ b/bin/bashbot_init.inc.sh @@ -11,28 +11,32 @@ # AUTHOR: KayM (gnadelwartz), kay@rrr.de # CREATED: 27.01.2021 13:42 # -#### $$VERSION$$ v1.35-dev-28-g3f331dc +#### $$VERSION$$ v1.35-dev-29-g0c0dc01 #=============================================================================== # shellcheck disable=SC2059 + ########## # commands to execute before bot_init() is called - ######## # called after default init is finished my_init() { - : # ypur commands here + : # your init here } ######### -# extended initialisation for advanced features like: # -# running bto as rest +# extended initialisation: # +# - uograde old config +# - backup of botconfig.jssh +# - running bot as service or other user +# - copy clean and dist files if not exist +# - configure bot for INLINE CALLBACK MEONLY SILENCER # -# delete from here to disable extended init +# delete from here to disable extended initialisation bot_init() { [ -n "${BASHBOT_HOME}" ] && cd "${BASHBOT_HOME}" || exit 1 local runuser chown touser botname DEBUG="$1"