Bug fixing

This commit is contained in:
Your Name
2025-05-25 14:36:37 +12:00
parent 7f35bbeb01
commit 8be69f24b6
4 changed files with 7 additions and 18 deletions

View File

@@ -30,16 +30,15 @@ if ! command -v jq &> /dev/null; then
fi
# read ~/.config/simple_object_storage/config.json
CONFIG_PATH="${HOME}/.config/simple_object_storage/config.json"
CONFIG_PATH="${SCRIPT_DIR}/.docker/config.json"
if [ ! -f "${CONFIG_PATH}" ]; then
echo "config file not found at ${CONFIG_PATH}"
exit 1
fi
CONFIG=$(cat "${CONFIG_PATH}")
# get the host and port from the config
HOST=$(echo $CONFIG | jq -r '.host')
PORT=$(echo $CONFIG | jq -r '.port')
HOST=localhost
PORT=8123
# extract the first write token from the config
WRITE_TOKEN=$(echo $CONFIG | jq -r '.write_tokens[0]')