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