Adjust to kubernetes secret mount format

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-01-22 01:07:14 +01:00
parent cb9ec1325a
commit 200a4d1ec3
Signed by: luzifer
GPG key ID: D91C3E91E4CAD6F5

View file

@ -60,7 +60,10 @@ function import_ssh_dir() {
return 1
}
rsync -a "${SSH_CONFIG_MOUNT}/" ~/.ssh/
local sync_src="${SSH_CONFIG_MOUNT}"
[[ -e $SSH_CONFIG_MOUNT/..data ]] && sync_src="${SSH_CONFIG_MOUNT}/..data" || true
rsync -a "${sync_src}/" ~/.ssh/
chown $(id -u) ~/.ssh/*
chmod 0600 ~/.ssh/*
}