Docker fix
This commit is contained in:
@@ -80,5 +80,7 @@ Container images are configured using parameters passed at runtime.
|
||||
|-e DM_FORWEB=|dm host for dm Web app (the host should be accessable from your browser). Default: `https://127.0.0.1`|
|
||||
|-e DM_WEBAUTH=|Enable Web app user interface authentication. Default: `0`|
|
||||
|-e DM_LC_ALL=|Set locale for dm. Default: `en_US.UTF-8`|
|
||||
|-e DM_TZ=|Set timezone for dm. Default: `Etc/UTC`|
|
||||
|-e DM_ACCOUNT_URL=|Set Account_URL for a new account registration. Format: `http[s]://<host>[:<port>]`|
|
||||
|-e DM_BITDEALS_PGP_FINGERPRINT=|Force to get BitDeals PGP key by fingerprint from keyserver. Default: `none`|
|
||||
|
||||
|
||||
@@ -10,6 +10,8 @@
|
||||
DM_FORWEB=${DM_FORWEB:-https://127.0.0.1}
|
||||
DM_WEBAUTH=${DM_WEBAUTH:-0}
|
||||
DM_TESTNET=${DM_TESTNET:-0}
|
||||
DM_LC_ALL=${DM_LC_ALL:-"en_US.UTF-8"}
|
||||
DM_TZ=${DM_TZ:-"UTC"}
|
||||
|
||||
## Daemon config files
|
||||
CONF_FILES=$(find /etc/dm/ -type f -name "*.conf" -not -name "default.conf")
|
||||
@@ -107,6 +109,14 @@ init_config()
|
||||
sed -i "/\[main\]/,/\[/ s/^#*testnet=.*/testnet=false/" $CONF_FILES
|
||||
fi
|
||||
|
||||
## Download BitDeals key from keyserver
|
||||
if [ "$DM_BITDEALS_PGP_FINGERPRINT" ]; then
|
||||
test "$DM_TESTNET" = 1 -o "$DM_TESTNET" = true && LOCATION="$BITDEALS_TEST_PGP_FILE" || LOCATION="$BITDEALS_PGP_FILE"
|
||||
for i in {1..2}; do gpg --keyserver keyserver.ubuntu.com --recv-keys "$BITDEALS_KEY_FINGERPRINT" && break; done && \
|
||||
gpg --armor --export "$BITDEALS_KEY_FINGERPRINT" > "$LOCATION"
|
||||
gpgconf --kill all
|
||||
fi
|
||||
|
||||
## Write PGP key variables to files
|
||||
if [ "$DM_BITDEALS_PGP" ]; then
|
||||
echo "$BITDEALS_PGP" > "$BITDEALS_PGP_FILE"
|
||||
|
||||
Reference in New Issue
Block a user