From 8f3bbb54a54232c97049ba8ebe587566e2987af8 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 11 Aug 2023 13:43:21 +0200 Subject: 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. --- config.sh.sample | 16 ++++++++-------- 1 file 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 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 -- cgit v1.2.3