mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-06-15 16:32:20 +00:00
bachbot.rc: add mode for background jobs
This commit is contained in:
parent
4591b357d1
commit
f1672bd536
|
@ -263,6 +263,6 @@ It features background tasks and interactive chats, and can serve as an interfac
|
||||||
<p>@Gnadelwartz</p>
|
<p>@Gnadelwartz</p>
|
||||||
<h2>That's it all guys!</h2>
|
<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>
|
<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>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -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
|
If you feel that there's something missing or if you found a bug, feel free to submit a
|
||||||
pull request!
|
pull request!
|
||||||
|
|
||||||
$$VERSION$$ v1.52-0-g1a83202
|
$$VERSION$$ v1.52-1-g0dae2db
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
#
|
#
|
||||||
# tested on: ubuntu, opensuse, debian
|
# tested on: ubuntu, opensuse, debian
|
||||||
#
|
#
|
||||||
#### $$VERSION$$ v1.52-1-g0dae2db
|
#### $$VERSION$$ v1.53-dev-0-g4591b35
|
||||||
# shellcheck disable=SC2009
|
# shellcheck disable=SC2009
|
||||||
# shellcheck disable=SC2181
|
# shellcheck disable=SC2181
|
||||||
# shellcheck disable=SC2250
|
# shellcheck disable=SC2250
|
||||||
|
@ -47,8 +47,11 @@ FIFO="${databotdir}/webhook-fifo-${name}"
|
||||||
# programs to run
|
# programs to run
|
||||||
bashbot="cd ${bashbotdir}; ${bashbotdir}/bashbot.sh"
|
bashbot="cd ${bashbotdir}; ${bashbotdir}/bashbot.sh"
|
||||||
webhook="cd ${bashbotdir}; nohup ${bashbotdir}/bin/process_batch.sh --startbot --watch ${FIFO}"
|
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=""
|
mode=""
|
||||||
|
backmode=""
|
||||||
|
#mode="debug"
|
||||||
|
#backmode="debug"
|
||||||
|
|
||||||
# select logfile for webhook start stop and script errors
|
# select logfile for webhook start stop and script errors
|
||||||
hooklog="DEBUG"
|
hooklog="DEBUG"
|
||||||
|
@ -137,7 +140,7 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
'suspendback'|'resumeback'|'killback')
|
'suspendback'|'resumeback'|'killback')
|
||||||
# shellcheck disable=SC2250
|
# shellcheck disable=SC2250
|
||||||
$runcmd "$bashbot $1"
|
$runcmd "$bashbot $1 $backmode"
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
# kill inotifywait from runuser
|
# kill inotifywait from runuser
|
||||||
if [ "$1" != "resumeback" ]; then
|
if [ "$1" != "resumeback" ]; then
|
||||||
|
|
Loading…
Reference in New Issue
Block a user