add apivariant

This commit is contained in:
2024-11-29 13:20:04 +03:00
parent ed91f1ba49
commit b503bf1136
2 changed files with 3 additions and 1 deletions

View File

@@ -55,4 +55,5 @@ Container images are configured using parameters passed at runtime.
|-e BITMESSAGE_SEED_ADDRESSES|Number of Deterministic Addresses to generate. Default: `1`|
|-e BITMESSAGE_TTL|The expiration of newly send messages, in seconds. Default: `172800`|
|-e BITMESSAGE_STOPRESENDINGAFTERXDAYS|Stop resending unreceived message after X days. Default: `60`|
|-e BITMESSAGE_APIVARIANT|provides xml or json-RPC API. Default: `legacy`|

View File

@@ -6,6 +6,7 @@ export BITMESSAGE_SEED_ADDRESSES=${BITMESSAGE_SEED_ADDRESSES:-1}
export BITMESSAGE_API_PORT=${BITMESSAGE_API_PORT:-8442}
export BITMESSAGE_TTL=${BITMESSAGE_TTL:-172800}
export BITMESSAGE_STOPRESENDINGAFTERXDAYS=${BITMESSAGE_STOPRESENDINGAFTERXDAYS:-30}
export BITMESSAGE_APIVARIANT=${BITMESSAGE_APIVARIANT:-legacy}
SEED_FILE="address_seed.txt"
test -e "$SEED_FILE" || gosu bitmessage touch "$SEED_FILE"
@@ -28,7 +29,7 @@ chmod 600 keys.dat
# set config values
gosu bitmessage sed -i -e "s|\(apiinterface = \).*|\10\.0\.0\.0|g" \
-e "s|\(apivariant = \).*|\1legacy|g" \
-e "s|\(apivariant = \).*|\1$BITMESSAGE_APIVARIANT|g" \
-e "s|\(apiusername = \).*|\1$BITMESSAGE_API_USER|g" \
-e "s|\(apipassword = \).*|\1$BITMESSAGE_API_PASSWORD|g" \
-e "s|\(apiport = \).*|\1$BITMESSAGE_API_PORT|g" \