From 0d38a67cf521b304565bf50a8a95348f34468146 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Sat, 27 Apr 2019 15:48:03 +0200 Subject: [PATCH] fix stupid mynewlinestartshere mistake --- README.md | 11 ++++++++++- README.txt | 17 ++++++++++++++++- bashbot.rc | 8 ++++++-- modules/background.sh | 4 ++-- 4 files changed, 34 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 800e8d1..74dd967 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,17 @@ To set access rights for your bashbot installation to a reasonable default run ` ### Is this Bot insecure? Bashbot is not more (in)secure as any other Bot written in any other language, we have done our best to make it as secure as possible. But YOU are responsible for the bot commands you wrote and you should know about the risks ... +### Why Bash and not the much better ...? +Well, thats a damn good question ... may be because I'm an Unix/Linux admin from stone age. Nevertheless there are more reasons from my side: + +- bashbot will run everywhere where bash is availible, from ebedded linux to mainframe +- easy to integrate with other shell/bashscripts for system admins to send status updates +- no need to install or learn a new programming language, library or framwework +- no database, not event driven, not OO ... +- + ## That's it! If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -#### $$VERSION$$ v0.70-pre1-2-g293ad08 +#### $$VERSION$$ v0.70-pre1-3-g3719c81 diff --git a/README.txt b/README.txt index 1eeefaf..fc2cc5a 100644 --- a/README.txt +++ b/README.txt @@ -121,11 +121,26 @@ language, we have done our best to make it as secure as possible. But YOU are responsible for the bot commands you wrote and you should know about the risks ... +Why Bash and not the much better ...? +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Well, thats a damn good question ... may be because I'm an Unix/Linux +admin from stone age. Nevertheless there are more reasons from my side: + +* bashbot will run everywhere where bash is availible, from ebedded +linux to mainframe +* easy to integrate with other shell/bashscripts for system admins to +send status updates +* no need to install or learn a new programming language, library or +framwework +* no database, not event driven, not OO ... +* + That's it! ~~~~~~~~~~ If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -latexmath:[\[VERSION\]] v0.70-pre1-2-g293ad08 +latexmath:[\[VERSION\]] v0.70-pre1-3-g3719c81 +++++++++++++++++++++++++++++++++++++++++++++ diff --git a/bashbot.rc b/bashbot.rc index f1fe816..bcfc6e2 100755 --- a/bashbot.rc +++ b/bashbot.rc @@ -1,7 +1,7 @@ #!/bin/sh # description: Start or stop telegram-bash-bot # -#### $$VERSION$$ v0.70-pre1-0-g490c472 +#### $$VERSION$$ v0.70-pre1-3-g3719c81 # shellcheck disable=SC2009 # shellcheck disable=SC2181 @@ -69,12 +69,16 @@ case "$1" in $0 stop; $0 start RETVAL=$? ;; +'restartback') + $0 suspendback; $0 resumeback + RETVAL=$? + ;; 'suspendback'|'resumeback'|'killback') $runcmd "$start $1" RETVAL=$? ;; *) - echo "Usage: $0 { start | stop | restart | reload | suspendback | resumeback | killback }" + echo "Usage: $0 { start | stop | restart | reload | restartback | suspendback | resumeback | killback }" RETVAL=1 ;; esac diff --git a/modules/background.sh b/modules/background.sh index f3056b4..21c5357 100644 --- a/modules/background.sh +++ b/modules/background.sh @@ -5,7 +5,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.70-pre1-0-g490c472 +#### $$VERSION$$ v0.70-pre1-3-g3719c81 # source from commands.sh if you want ro use interactive or background jobs @@ -18,7 +18,7 @@ send_message() { local text arg keyboard btext burl no_keyboard file lat long title address sent [ "$2" = "" ] && return local mychat="$1" - text="$(sed <<< "${2}" 's/ mynewlinestartshere /\r\n/g; s/ my[kfltab][a-z]\{2,13\}startshere.*//g;s/ mykeyboardendshere.*//g')" + text="$(sed <<< "${2}" 's/ mynewlinestartshere/\r\n/g; s/ my[kfltab][a-z]\{2,13\}startshere.*//g;s/ mykeyboardendshere.*//g')" arg="$3" [ "$arg" != "safe" ] && { no_keyboard="$(sed <<< "${2}" '/mykeyboardendshere/!d;s/.*mykeyboardendshere.*/mykeyboardendshere/')"