mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-27 20:44:53 +00:00
Bashbot Version 0.70 - startproc
This commit is contained in:
parent
e337b745bb
commit
8ea9e3b158
@ -128,7 +128,7 @@ else
|
||||
;;
|
||||
|
||||
'/cancel'*)
|
||||
checkprog
|
||||
checkproc
|
||||
if [ "$res" -eq 0 ] ; then killproc && _message "Command canceled.";else _message "No command is currently running.";fi
|
||||
;;
|
||||
*) # forward other messages to optional dispatcher
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# file: calc.sh
|
||||
# example for an interactive chat, run with startprog calc.sh
|
||||
# example for an interactive chat, run with startproc calc.sh
|
||||
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
# file: question.sh
|
||||
# example for an interactive chat, run with startprog question.sh
|
||||
# example for an interactive chat, run with startproc question.sh
|
||||
|
||||
# This file is public domain in the USA and all free countries.
|
||||
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
|
||||
|
@ -32,7 +32,7 @@ mycommands() {
|
||||
fi
|
||||
;;
|
||||
|
||||
'/run-notify'*) # start notify background job
|
||||
'/run_notify'*) # start notify background job
|
||||
myback="notify"; checkback "$myback"
|
||||
if [ "$res" -gt 0 ] ; then
|
||||
background "example/notify 60" "$myback" # notify every 60 seconds
|
||||
@ -40,7 +40,7 @@ mycommands() {
|
||||
send_normal_message "${CHAT[ID]}" "Background command $myback already running ..."
|
||||
fi
|
||||
;;
|
||||
'/stop-notify'*) # kill notify background job
|
||||
'/stop_notify'*) # kill notify background job
|
||||
myback="notify"; checkback "$myback"
|
||||
if [ "$res" -eq 0 ] ; then
|
||||
killback "$myback"
|
||||
|
Loading…
Reference in New Issue
Block a user