updated requirements

This commit is contained in:
tim
2024-07-26 23:34:09 -04:00
parent 9a0d0bc932
commit 497410340f
3 changed files with 19 additions and 13 deletions

View File

@@ -1,5 +1,8 @@
#!/bin/bash
SCRIPT_DIR="$(dirname -- "$( readlink -f -- "$0"; )";)"
CONF_DIR="$SCRIPT_DIR/../conf"
if [ "$1" == "" ]; then
echo 'usage: config-push {config_name} [secret_name]'
exit 1
@@ -14,9 +17,9 @@ else
KEY=backend
fi
DEXO="conf/dexorder-$CONFIG.toml"
DEXO="$CONF_DIR/dexorder-$CONFIG.toml"
if [ ! -f "$DEXO" ]; then
DEXO="conf/$CONFIG/dexorder-$CONFIG.toml"
DEXO="$CONF_DIR/$CONFIG/dexorder-$CONFIG.toml"
fi
if [ ! -f "$DEXO" ]; then
DEXO=
@@ -24,9 +27,9 @@ else
DEXO="--from-file dexorder.toml=$DEXO"
fi
LOG="conf/logging-$CONFIG.toml"
LOG="$CONF_DIR/logging-$CONFIG.toml"
if [ ! -f "$LOG" ]; then
LOG="conf/$CONFIG/logging-$CONFIG.toml"
LOG="$CONF_DIR/$CONFIG/logging-$CONFIG.toml"
fi
if [ ! -f "$LOG" ]; then
LOG=
@@ -34,9 +37,9 @@ else
LOG="--from-file logging.toml=$LOG"
fi
META="conf/metadata-$CONFIG.json"
META="$CONF_DIR/metadata-$CONFIG.json"
if [ ! -f "$META" ]; then
META="conf/$CONFIG/metadata-$CONFIG.json"
META="$CONF_DIR/$CONFIG/metadata-$CONFIG.json"
fi
if [ ! -f "$META" ]; then
META=

View File

@@ -1,5 +1,8 @@
#!/bin/bash
SCRIPT_DIR="$(dirname -- "$( readlink -f -- "$0"; )";)"
CONF_DIR="$SCRIPT_DIR/../conf"
if [ "$1" == "" ]; then
echo 'usage: secret-push {config_name} [secret_name]'
exit 1
@@ -9,18 +12,18 @@ CONFIG=$1
shift
if [ "$1" != "" ]; then
KEY=backend-$1
KEY=backend-secret-$1
else
KEY=backend
KEY=backend-secret
fi
FILE="conf/dexorder-$CONFIG.toml"
FILE="$CONF_DIR/dexorder-$CONFIG.toml"
if [ ! -f "$FILE" ]; then
FILE="conf/$CONFIG/dexorder-$CONFIG.toml"
FILE="$CONF_DIR/$CONFIG/dexorder-$CONFIG.toml"
fi
if [ ! -f "$FILE" ]; then
echo Could not find config file for $1
echo Could not find config file for $CONFIG
exit 1;
fi