mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-24 16:27:33 +00:00
init: finalize external init
This commit is contained in:
parent
0c0dc01f26
commit
e83f4d443f
@ -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"
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user