mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nixos-infect.git
synced 2024-11-21 19:41:28 +00:00
fix: absent SSH_AUTHORIZED_KEY does not cause failure
This commit is contained in:
parent
4920434aec
commit
15f36551ad
|
@ -30,9 +30,11 @@ readonly NIX_OPTS=(--extra-experimental-features "nix-command flakes")
|
|||
DoNetConf=
|
||||
|
||||
genOptionalSsh() {
|
||||
[ -n "${SSH_AUTHORIZED_KEY}" ] && cat << EOF
|
||||
if [ -n "${SSH_AUTHORIZED_KEY}" ]; then
|
||||
cat << EOF
|
||||
"ssh": { "rootKeys": [ "${SSH_AUTHORIZED_KEY}" ] },
|
||||
EOF
|
||||
fi
|
||||
}
|
||||
|
||||
# TODO receive disk device path from outside
|
||||
|
@ -528,8 +530,6 @@ set -o xtrace
|
|||
shopt -s inherit_errexit
|
||||
trap 'echo ${LINENO}: "$BASH_COMMAND"; exit 1' ERR
|
||||
|
||||
genNetworkingConf
|
||||
|
||||
# digitalocean requires detailed network config to be generated
|
||||
[ "$PROVIDER" == "digitalocean" ] && DoNetConf="y"
|
||||
|
||||
|
|
Loading…
Reference in a new issue