update environment doc

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2020-06-07 19:47:46 +02:00
parent d11598e082
commit 720dc59713
2 changed files with 35 additions and 1 deletions

BIN
doc/.4_expert.md.swp Normal file

Binary file not shown.

View File

@ -277,6 +277,26 @@ Uses given URL instead of offical telegram API URL, useful if you have your own
``` ```
##### BASHBOT_TOKEN ##### BASHBOT_TOKEN
If BASHBOT_TOKEN is set, bashbot assumes you know what you are doing and skips environment validation and
uses the value of BASHBOT_TOKEN as bot token.
I recommend to run 'bashbot.sh init' at least one time without BASHBOT_TOKEN set to validate and setup
the environment. Afterwards you can delete the token file and provide the bot token in BASHBOT_TOKEN.
##### BASHBOT_CURL_ARGS
The value of BASHBOT_CURL_ARGS is passed to every curl execution.
```bash
# use socks gateway on localhost
export BASHBOT_CURL_ARGS="--socks5-hostname localhost"
```
##### BASHBOT_CURL
If BASHBOT_CURL is not set your systems default curl is used. If you want to use an alternative curl executable
set BASHBOT_CURL to point to it.
```bash
# use curl from /usr/local/bin
export BASHBOT_CURL="/usr/local/bin/mycurl"
```
##### BASHBOT_WGET ##### BASHBOT_WGET
Bashbot uses ```curl``` to communicate with telegram server. if ```curl``` is not availible ```wget``` is used. Bashbot uses ```curl``` to communicate with telegram server. if ```curl``` is not availible ```wget``` is used.
@ -290,6 +310,20 @@ If 'BASHBOT_WGET' is set to any value (not undefined or not empty) wget is used
``` ```
##### BASHBOT_TIMEOUT
Bashbot uses a default timeout of 20 seconds for curl and wget. If you want a different timeout, set
BASHBOT_TIMEOUT to a numeric value between 1 and 999. Any non numeric or negative value is ignored.
```bash
# set timeout to 100 seconds
export BASHBOT_TIMEOUT="100"
# 100s is not a numbers
export BASHBOT_TIMEOUT="100s" # wrong, default timeout is used
# -100 is not between 1 and 999s
export BASHBOT_TIMEOUT="-100" # wrong, default timeout is used
```
##### BASHBOT_SLEEP ##### BASHBOT_SLEEP
Instead of polling permanently or with a fixed delay, bashbot offers a simple adaptive polling. Instead of polling permanently or with a fixed delay, bashbot offers a simple adaptive polling.
If messages are recieved bashbot polls with no dealy. If no messages are availible bashbot add 100ms delay If messages are recieved bashbot polls with no dealy. If no messages are availible bashbot add 100ms delay
@ -348,5 +382,5 @@ for every poll until the maximum of BASHBOT_SLEEP ms.
#### [Prev Advanced Use](3_advanced.md) #### [Prev Advanced Use](3_advanced.md)
#### [Next Best Practice](5_practice.md) #### [Next Best Practice](5_practice.md)
#### $$VERSION$$ v0.96-dev-7-g0153928 #### $$VERSION$$ v0.96-dev3-16-gd11598e