move individual debug checks to mycommands.sh

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-07-02 17:10:20 +02:00
parent 550387bdbc
commit 2d48670680
1 changed files with 9 additions and 1 deletions

View File

@ -8,7 +8,7 @@
# #### if you start to develop your own bot, use the clean version of this file:
# #### mycommands.clean
#
#### $$VERSION$$ v0.98-0-g5b5447e
#### $$VERSION$$ v0.98-1-g550387b
#
# uncomment the following lines to overwrite info and help messages
@ -240,6 +240,14 @@ else
esac
}
# debug function called on start, stop of bot, interactive and background processes
# if your bot was started with debug as second argument
# $1 current date, $2 from where the function wqs called, $3 ... $n optional information
my_debug_checks() {
# example check because my bot creates a wrong file, this was becuase an empty variable
[ -f ".jssh" ] && printf "%s: %s\n" "${1}" "Ups, found file \"${PWD:-.}/.jssh\"! =========="
}
# place your processing functions here
# $1 search parameter