mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-11-26 01:07:34 +00:00
add config examples
This commit is contained in:
parent
fe5840d3fc
commit
c527d175f0
@ -61,5 +61,5 @@ group. This step is up to you actually.
|
|||||||
|
|
||||||
#### [Next Getting started](2_usage.md)
|
#### [Next Getting started](2_usage.md)
|
||||||
|
|
||||||
#### $$VERSION$$ v0.70-dev2-4-g893ee61
|
#### $$VERSION$$ v0.70-dev2-5-gfe5840d
|
||||||
|
|
||||||
|
@ -159,5 +159,5 @@ send_action "${CHAT[ID]}" "action"
|
|||||||
#### [Prev Create Bot](1_firstbot.md)
|
#### [Prev Create Bot](1_firstbot.md)
|
||||||
#### [Next Advanced Usage](3_advanced.md)
|
#### [Next Advanced Usage](3_advanced.md)
|
||||||
|
|
||||||
#### $$VERSION$$ v0.70-dev2-4-g893ee61
|
#### $$VERSION$$ v0.70-dev2-5-gfe5840d
|
||||||
|
|
||||||
|
@ -156,5 +156,5 @@ answer_inline_query "$iQUERY_ID" "cached_sticker" "identifier for the sticker"
|
|||||||
#### [Prev Advanced Usage](3_advanced.md)
|
#### [Prev Advanced Usage](3_advanced.md)
|
||||||
#### [Next Expert Use](4_expert.md)
|
#### [Next Expert Use](4_expert.md)
|
||||||
|
|
||||||
#### $$VERSION$$ v0.70-dev2-4-g893ee61
|
#### $$VERSION$$ v0.70-dev2-5-gfe5840d
|
||||||
|
|
||||||
|
@ -104,5 +104,5 @@ An example crontab is provided in ```examples/bashbot.cron```.
|
|||||||
#### [Prev Expert Use](4_expert.md)
|
#### [Prev Expert Use](4_expert.md)
|
||||||
#### [Next Best Practice](5_practice.md)
|
#### [Next Best Practice](5_practice.md)
|
||||||
|
|
||||||
#### $$VERSION$$ v0.70-dev2-4-g893ee61
|
#### $$VERSION$$ v0.70-dev2-5-gfe5840d
|
||||||
|
|
||||||
|
@ -112,5 +112,5 @@ The second warning is about an unused variable, this is true because in our exam
|
|||||||
#### [Prev Best Practice](5_practice.md)
|
#### [Prev Best Practice](5_practice.md)
|
||||||
#### [Next Functions Reference](6_reference.md)
|
#### [Next Functions Reference](6_reference.md)
|
||||||
|
|
||||||
#### $$VERSION$$ v0.70-dev2-4-g893ee61
|
#### $$VERSION$$ v0.70-dev2-5-gfe5840d
|
||||||
|
|
||||||
|
@ -348,5 +348,5 @@ Send Input from Telegram to waiting Interactive Chat.
|
|||||||
#### [Prev Best Practice](5_practice.md)
|
#### [Prev Best Practice](5_practice.md)
|
||||||
#### [Next Notes for Developers](7_develop.md)
|
#### [Next Notes for Developers](7_develop.md)
|
||||||
|
|
||||||
#### $$VERSION$$ v0.70-dev2-4-g893ee61
|
#### $$VERSION$$ v0.70-dev2-5-gfe5840d
|
||||||
|
|
||||||
|
@ -71,5 +71,5 @@ fi
|
|||||||
#### [Prev Function Reference](6_function.md)
|
#### [Prev Function Reference](6_function.md)
|
||||||
#### [Next Bashbot Environment](8_custom.md)
|
#### [Next Bashbot Environment](8_custom.md)
|
||||||
|
|
||||||
#### $$VERSION$$ v0.70-dev2-4-g893ee61
|
#### $$VERSION$$ v0.70-dev2-5-gfe5840d
|
||||||
|
|
||||||
|
@ -4,10 +4,11 @@ This section describe how you can customize bashbot to your needs by setting env
|
|||||||
|
|
||||||
|
|
||||||
### Change file locations
|
### Change file locations
|
||||||
In standard setup bashbot is self containing, this means you can place 'telegram-bot-bash' on any location
|
In standard setup bashbot is self containing, this means you can place 'telegram-bot-bash' any location
|
||||||
and run it from there. All files - programm, config, data etc - will reside in 'telegram-bot-bash'.
|
and run it from there. All files - programm, config, data etc - will reside in 'telegram-bot-bash'.
|
||||||
|
|
||||||
If you want other locations for config, data etc, define and export the following environment variables:
|
If you want to have other locations for config, data etc, define and export the following environment variables.
|
||||||
|
**Note: all specified directories and files must exist or running 'bashbot.sh' will fail.**
|
||||||
|
|
||||||
#### BASHBOT_ETC
|
#### BASHBOT_ETC
|
||||||
Location of the config files 'token', 'botadmin', 'botacl' ...
|
Location of the config files 'token', 'botadmin', 'botacl' ...
|
||||||
@ -75,7 +76,51 @@ for every poll until the maximum of BASHBOT_SLEEP ms.
|
|||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Testet location configs
|
||||||
|
**Note: Environment variables are not stored, you must setup them before every call to bashbot.sh, e.g. from a script.**
|
||||||
|
|
||||||
|
#### simple Unix like config, mainly for one bot. bashbot is in '/usr/local/telegram-bot-bash'
|
||||||
|
```bash
|
||||||
|
# Note: all dirs and files must exist!
|
||||||
|
export BASHBOT_ETC "/etc/bashbot"
|
||||||
|
export BASHBOT_VAR "/var/spool/bashbot"
|
||||||
|
|
||||||
|
/usr/local/telegram-bot-bash/bashbot.sh start
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Unix like config, mainly for one bot. bashbot.sh is in '/usr/bin'
|
||||||
|
```bash
|
||||||
|
# Note: all dirs and files must exist!
|
||||||
|
export BASHBOT_ETC "/etc/bashbot"
|
||||||
|
export BASHBOT_VAR "/var/spool/bashbot"
|
||||||
|
export BASHBOT_JSONSH "/var/spool/bashbot"
|
||||||
|
export BASHBOT_COMMANDS "/etc/bashbot/commands.sh
|
||||||
|
|
||||||
|
/usr/local/bin/bashbot.sh start
|
||||||
|
```
|
||||||
|
|
||||||
|
#### simple multibot config bashbot is in '/usr/local/telegram-bot-bash'
|
||||||
|
```bash
|
||||||
|
# config for running Bot 1
|
||||||
|
# Note: all dirs and files must exist!
|
||||||
|
export BASHBOT_ETC "./mybot1"
|
||||||
|
export BASHBOT_VAR "./mybot1"
|
||||||
|
export BASHBOT_COMMANDS "./mybot1/commands.sh
|
||||||
|
|
||||||
|
/usr/local/telegram-bot-bash/bashbot.sh start
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# config for running Bot 2
|
||||||
|
# Note: all dirs and files must exist!
|
||||||
|
export BASHBOT_ETC "./mybot2"
|
||||||
|
export BASHBOT_VAR "./mybot2"
|
||||||
|
export BASHBOT_COMMANDS "./mybot2/commands.sh
|
||||||
|
|
||||||
|
/usr/local/telegram-bot-bash/bashbot.sh start
|
||||||
|
```
|
||||||
|
|
||||||
#### [Prev Notes for Developers](7_develop.md)
|
#### [Prev Notes for Developers](7_develop.md)
|
||||||
|
|
||||||
#### $$VERSION$$ v0.70-dev2-4-g893ee61
|
#### $$VERSION$$ v0.70-dev2-5-gfe5840d
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user