Correct ownership of deploy homedir too

This commit is contained in:
Joshua Boniface 2023-09-01 15:41:54 -04:00
parent c5cd38ce68
commit 5e62235a54
1 changed files with 1 additions and 0 deletions

View File

@ -300,6 +300,7 @@ chroot ${target} mkdir -p /var/home/deploy/.ssh
if [[ -n ${target_keys_url} ]]; then
wget -O ${target}/var/home/deploy/.ssh/authorized_keys ${target_keys_url}
chmod 0600 /var/home/deploy/.ssh/authorized_keys
chown -R deploy:operator /var/home/deploy
else
echo "${target_password}" | chroot ${target} passwd --stdin deploy >&2
fi