Fix if condition

This commit is contained in:
Inex Code 2022-04-06 19:49:24 +03:00
parent 3a224f2111
commit 0f779b5a1a

View file

@ -9,6 +9,7 @@ makeConf() {
[[ -e /etc/nixos/configuration.nix ]] && return 0 [[ -e /etc/nixos/configuration.nix ]] && return 0
if [[ $PASSWORD == null ]]; then if [[ $PASSWORD == null ]]; then
export PASSWORD=$(printf $ENCODED_PASSWORD | base64 --decode) export PASSWORD=$(printf $ENCODED_PASSWORD | base64 --decode)
fi
export ESCAPED_PASSWORD=$(printf $ENCODED_PASSWORD | base64 --decode | jq -Rs .) export ESCAPED_PASSWORD=$(printf $ENCODED_PASSWORD | base64 --decode | jq -Rs .)
export HASHED_PASSWORD=$( mkpasswd -m sha-512 "$PASSWORD" ) export HASHED_PASSWORD=$( mkpasswd -m sha-512 "$PASSWORD" )