diff --git a/README.html b/README.html index ec70693..b4ffb7e 100644 --- a/README.html +++ b/README.html @@ -79,9 +79,6 @@
  • Customize bashbot environment
  • Examples
  • -

    You don’t like the many bashbot files?

    -

    At the beginning bashbot was simply the file bashbot.sh I can copy everywhere and run the bot. Now we have ‘commands.sh’, ‘mycommands.sh’, ’modules/*.sh’ and much more.

    -

    Hey no Problem, if you are finished with your cool bot simply run dev/make-standalone.sh to create a stripped down Version containing only ‘bashbot.sh’ and ‘commands.sh’! For more information see Create a stripped down Version of your Bot

    Security Considerations

    Running a Telegram Bot means it is connected to the public and you never know whats send to your Bot.

    Bash scripts in general are not designed to be bullet proof, so consider this Bot as a proof of concept. Bash programmers often struggle with ‘quoting hell’ and globbing, see Implications of wrong quoting

    @@ -94,6 +91,7 @@

    Your Bot configuration must no be readable from other users. Everyone who can read your Bots token can act as your Bot and has access to all chats your Bot is in!

    Everyone with read access to your Bot files can extract your Bots data. Especially your Bot Token in token must be protected against other users. No one exept you must have write access to the Bot files. The Bot must be restricted to have write access to count and tmp-bot-bash only, all other files must be write protected.

    To set access rights for your bashbot installation to a reasonable default run sudo ./bashbot.sh init after every update or change to your installation directory.

    +

    FAQ

    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 xyz?

    @@ -104,9 +102,12 @@
  • no need to install or learn a new programming language, library or framework
  • no database, not event driven, not OO …
  • +

    Can I have the single bashbot.sh file back?

    +

    At the beginning bashbot was simply the file bashbot.sh you can copy everywhere and run the bot. Now we have ‘commands.sh’, ‘mycommands.sh’, ’modules/*.sh’ and much more.

    +

    Hey no Problem, if you are finished with your cool bot run dev/make-standalone.sh to create a stripped down Version of your bot containing only ‘bashbot.sh’ and ‘commands.sh’! For more information see Create a stripped down Version of your Bot

    @Gnadelwartz

    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.80-pre-0-gdd7c66d

    +


    VERSION
    v0.80-pre-8-gf1ebdbb

    diff --git a/README.md b/README.md index 6379fc9..221f69a 100644 --- a/README.md +++ b/README.md @@ -59,12 +59,6 @@ Bashbot [Documentation](https://github.com/topkecleon/telegram-bot-bash) and [Do * [Examples](examples/README.md) -#### You don't like the many bashbot files? -At the beginning bashbot was simply the file ```bashbot.sh``` I can copy everywhere and run the bot. Now we have 'commands.sh', 'mycommands.sh', 'modules/*.sh' and much more. - -Hey no Problem, if you are finished with your cool bot simply run ```dev/make-standalone.sh``` to create a stripped down Version containing only -'bashbot.sh' and 'commands.sh'! For more information see [Create a stripped down Version of your Bot](doc/7_develop.md) - ## Security Considerations Running a Telegram Bot means it is connected to the public and you never know whats send to your Bot. @@ -89,6 +83,8 @@ Everyone with read access to your Bot files can extract your Bots data. Especial To set access rights for your bashbot installation to a reasonable default run ```sudo ./bashbot.sh init``` after every update or change to your installation directory. +## FAQ + ### 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 ... @@ -100,10 +96,17 @@ Well, thats a damn good question ... may be because I'm an Unix/Linux admin from - no need to install or learn a new programming language, library or framework - no database, not event driven, not OO ... +#### Can I have the single bashbot.sh file back? +At the beginning bashbot was simply the file ```bashbot.sh``` you can copy everywhere and run the bot. Now we have 'commands.sh', 'mycommands.sh', 'modules/*.sh' and much more. + +Hey no Problem, if you are finished with your cool bot run ```dev/make-standalone.sh``` to create a stripped down Version of your bot containing only +'bashbot.sh' and 'commands.sh'! For more information see [Create a stripped down Version of your Bot](doc/7_develop.md) + + @Gnadelwartz ## 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.80-pre-0-gdd7c66d +#### $$VERSION$$ v0.80-pre-8-gf1ebdbb diff --git a/README.txt b/README.txt index 42ae383..2ab117c 100644 --- a/README.txt +++ b/README.txt @@ -71,16 +71,6 @@ all](https://core.telegram.org/bots#3-how-do-i-create-a-bot) * [Examples](examples/README.md) -#### You don't like the many bashbot files? -At the beginning bashbot was simply the file ```bashbot.sh``` I can copy -everywhere and run the bot. Now we have 'commands.sh', 'mycommands.sh', -'modules/*.sh' and much more. - -Hey no Problem, if you are finished with your cool bot simply run -```dev/make-standalone.sh``` to create a stripped down Version containing only -'bashbot.sh' and 'commands.sh'! For more information see [Create a stripped -down Version of your Bot](doc/7_develop.md) - ## Security Considerations Running a Telegram Bot means it is connected to the public and you never know whats send to your Bot. @@ -131,6 +121,8 @@ To set access rights for your bashbot installation to a reasonable default run ```sudo ./bashbot.sh init``` after every update or change to your installation directory. +## FAQ + ### 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 @@ -147,6 +139,18 @@ health status - no need to install or learn a new programming language, library or framework - no database, not event driven, not OO ... +#### Can I have the single bashbot.sh file back? +At the beginning bashbot was simply the file ```bashbot.sh``` you can copy +everywhere and run the bot. Now we have 'commands.sh', 'mycommands.sh', +'modules/*.sh' and much more. + +Hey no Problem, if you are finished with your cool bot run +```dev/make-standalone.sh``` to create a stripped down Version of your bot +containing only +'bashbot.sh' and 'commands.sh'! For more information see [Create a stripped +down Version of your Bot](doc/7_develop.md) + + @Gnadelwartz ## That's it! @@ -154,4 +158,4 @@ health status If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -#### $$VERSION$$ v0.80-pre-0-gdd7c66d +#### $$VERSION$$ v0.80-pre-8-gf1ebdbb diff --git a/bashbot.sh b/bashbot.sh index b6059ac..94db6d4 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -11,7 +11,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.80-pre-7-g300553f +#### $$VERSION$$ v0.80-pre-8-gf1ebdbb # # Exit Codes: # - 0 sucess (hopefully) @@ -543,6 +543,7 @@ if [ "$1" != "source" ]; then exit ;; "backgr"* | "resumeb"*) + _is_function start_proc || { echo -e "${RED}Module background not availible.${NC}"; exit 3; } echo -e "${GREEN}Restart background processes ...${NC}" for FILE in "${TMPDIR:-.}/"*-back.cmd; do if [ "${FILE}" = "${TMPDIR:-.}/*-back.cmd" ]; then @@ -555,11 +556,12 @@ if [ "$1" != "source" ]; then JOB="${JOB%:*}" fifo="$(procname "${CHAT[ID]}" "back-${JOB}-")" echo "restart background job ${PROG} ${fifo}" - start_back "${CHAT[ID]}" "${PROG}" "${JOB}" + start_proc "${CHAT[ID]}" "${PROG}" "back-${JOB}-" fi done ;; "killb"* | "suspendb"*) + _is_function start_proc || { echo -e "${RED}Module background not availible.${NC}"; exit 3; } echo -e "${GREEN}Stopping background processes ...${NC}" for FILE in "${TMPDIR:-.}/"*-back.cmd; do if [ "${FILE}" = "${TMPDIR:-.}/*-back.cmd" ]; then