mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-28 10:16:28 +00:00
init: external init extension
This commit is contained in:
parent
ca9ea1bf31
commit
3f331dc8e8
@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb
|
|||||||
# 8 - curl/wget missing
|
# 8 - curl/wget missing
|
||||||
# 10 - not bash!
|
# 10 - not bash!
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v1.35-dev-26-gb45efa3
|
#### $$VERSION$$ v1.35-dev-27-gca9ea1b
|
||||||
##################################################################
|
##################################################################
|
||||||
|
|
||||||
# emmbeded system may claim bash but it is not
|
# 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
|
# run after every update to update files and adjust permissions
|
||||||
"init")
|
"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"
|
bot_init "$2"
|
||||||
debug_checks "end init" "$@"
|
debug_checks "end init" "$@"
|
||||||
exit
|
exit
|
||||||
|
29
bin/bashbot_init.inc.sh
Normal file
29
bin/bashbot_init.inc.sh
Normal file
@ -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
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user