Skip to content

Commit

Permalink
fix NATS_PASSWORD_CRYPT value
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Dec 5, 2024
1 parent 01ae8ac commit 8dc5471
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ prepare_nats() {
NATS_ACCOUNT="PNM"
NATS_USER="auth"
NATS_PASSWORD=$(random_key 36)
NATS_PASSWORD_CRYPT=$(docker run --rm -it bitnami/natscli:latest server passwd -p "$NATS_PASSWORD")
NATS_PASSWORD_CRYPT=$(docker run --rm -it bitnami/natscli:latest server passwd -p "$NATS_PASSWORD" | tr -d '\r')

OUTPUT=$(docker run --rm -it natsio/nats-box:latest nsc generate nkey --account)
readarray -t array < <(printf '%b\n' "$OUTPUT")
Expand All @@ -222,7 +222,7 @@ prepare_nats() {

sed -i "s/_NATS_ACCOUNT_/$NATS_ACCOUNT/g" nats-server.conf
sed -i "s/_NATS_USER_/$NATS_USER/g" nats-server.conf
sed -i "s/_NATS_PASSWORD_CRYPT_/$NATS_PASSWORD_CRYPT/g" nats-server.conf
sed -i "s|_NATS_PASSWORD_CRYPT_|$NATS_PASSWORD_CRYPT|g" nats-server.conf
sed -i "s/_NATS_CALLOUT_PUBLIC_KEY_/$NATS_CALLOUT_PUBLIC_KEY/g" nats-server.conf
}

Expand Down

0 comments on commit 8dc5471

Please sign in to comment.