bachbot.rc: add mode for background jobs

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2022-08-03 10:09:52 +02:00
parent 4591b357d1
commit f1672bd536
3 changed files with 8 additions and 5 deletions

View File

@ -263,6 +263,6 @@ It features background tasks and interactive chats, and can serve as an interfac
<p>@Gnadelwartz</p>
<h2>That's it all guys!</h2>
<p>If you feel that there's something missing or if you found a bug, feel free to submit a pull request!</p>
<h4>$$VERSION$$ v1.52-0-g1a83202</h4>
<h4>$$VERSION$$ v1.52-1-g0dae2db</h4>
</body>
</html>

View File

@ -319,5 +319,5 @@ That's it all guys!
If you feel that there's something missing or if you found a bug, feel free to submit a
pull request!
$$VERSION$$ v1.52-0-g1a83202
$$VERSION$$ v1.52-1-g0dae2db

View File

@ -5,7 +5,7 @@
#
# tested on: ubuntu, opensuse, debian
#
#### $$VERSION$$ v1.52-1-g0dae2db
#### $$VERSION$$ v1.53-dev-0-g4591b35
# shellcheck disable=SC2009
# shellcheck disable=SC2181
# shellcheck disable=SC2250
@ -47,8 +47,11 @@ FIFO="${databotdir}/webhook-fifo-${name}"
# programs to run
bashbot="cd ${bashbotdir}; ${bashbotdir}/bashbot.sh"
webhook="cd ${bashbotdir}; nohup ${bashbotdir}/bin/process_batch.sh --startbot --watch ${FIFO}"
# set additionl parameter, e.g. debug
# set additional parameter, e.g. debug
mode=""
backmode=""
#mode="debug"
#backmode="debug"
# select logfile for webhook start stop and script errors
hooklog="DEBUG"
@ -137,7 +140,7 @@ case "$1" in
;;
'suspendback'|'resumeback'|'killback')
# shellcheck disable=SC2250
$runcmd "$bashbot $1"
$runcmd "$bashbot $1 $backmode"
RETVAL=$?
# kill inotifywait from runuser
if [ "$1" != "resumeback" ]; then