aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-08-11 13:43:21 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2023-08-11 13:43:21 +0200
commit8f3bbb54a54232c97049ba8ebe587566e2987af8 (patch)
tree0b619f298ed082ac561082df757a465e229666c6
parent0a0ad5199d5fada3b199f55552852556df58e199 (diff)
downloadgeldschieberbot-8f3bbb54a54232c97049ba8ebe587566e2987af8.tar.gz
geldschieberbot-8f3bbb54a54232c97049ba8ebe587566e2987af8.zip
improve the sample config
Remove the not used GSB_USER variable. Add an example for the send command using signal-cli. Change the legacy STATE_PATH variable to the single state file variable GSB_STATE_FILE.
-rw-r--r--config.sh.sample16
1 files changed, 8 insertions, 8 deletions
diff --git a/config.sh.sample b/config.sh.sample
index a954658..7df517c 100644
--- a/config.sh.sample
+++ b/config.sh.sample
@@ -1,16 +1,16 @@
#!/bin/bash
# Group the bot should monitor
-export GSB_GROUP_ID=""
-# Path where the bots data should be stored
-export GSB_STORE_PATH="~/geldschieberbot"
+export GSB_GROUP_ID="your_groupid"
+# File where the bot's state should be stored
+export GSB_STATE_FILE="${GSB_STORE_PATH}/state.json"
# Command the bot uses to send responses
+#export GSB_SEND_CMD="signal-cli -u <your-phone-number> send --message-from-stdin -g ${GSB_GROUP}"
export GSB_SEND_CMD=""
-# Signal user the bot should use
-export GSB_USER=""
-# create GSB_STORE_PATH
-if [[ ! -e "$GSB_STORE_PATH" ]]
+GSB_STATE_DIR="$(dirname "$GSB_STATE_FILE")"
+# create GSB_STATE_DIR
+if [[ ! -e "${GSB_STATE_DIR}" ]]
then
- mkdir -p $GSB_STORE_PATH 2>/dev/null
+ mkdir -p "${GSB_STATE_DIR}" 2>/dev/null
fi