diff --git a/bashbot.sh b/bashbot.sh index 5741766..29045a2 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-26-gb45efa3 +#### $$VERSION$$ v1.35-dev-27-gca9ea1b ################################################################## # emmbeded system may claim bash but it is not @@ -1265,6 +1265,8 @@ if [ -z "${SOURCE}" ]; then ;; # run after every update to update files and adjust permissions "init") + # shellcheck source=./bin/bashbot._init.inc.sh" + [ -r "${BASHBOT_HOME:-.}/bin/bashbot_init.inc.sh" ] && source "${BASHBOT_HOME:-.}/bin/bashbot_init.inc.sh" bot_init "$2" debug_checks "end init" "$@" exit diff --git a/bin/bashbot_init.inc.sh b/bin/bashbot_init.inc.sh new file mode 100644 index 0000000..5b86a82 --- /dev/null +++ b/bin/bashbot_init.inc.sh @@ -0,0 +1,29 @@ +#!/bin/bash +#=============================================================================== +# +# FILE: bashbot_init.inc.sh +# +# USAGE: source bashbot_init.inc.sh +# +# DESCRIPTION: extend / overwrite bashbot initialisation +# +# LICENSE: WTFPLv2 http://www.wtfpl.net/txt/copying/ +# AUTHOR: KayM (gnadelwartz), kay@rrr.de +# CREATED: 27.01.2021 13:42 +# +#### $$VERSION$$ v1.35-dev-27-gca9ea1b +#=============================================================================== + +########## +# commands to execute before bot_init() is called + + +######### +# uncomment to overwrite default init +# bot_init() { my_init(); } + +######## +# called after default init is finished +my_init() { + : # ypur commands here +}