restorecon the correct directory

if using different path for authorized_keys file

SSH-Copy-ID-Upstream: 791a3df47b48412c726bff6f7b1d190721e65d51
This commit is contained in:
Jakub Jelen 2020-09-29 10:00:01 +00:00 committed by Darren Tucker
parent 9beeab8a37
commit 333e25f7bc
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ installkeys_sh() {
cat >> ${AUTH_KEY_FILE} ||
exit 1;
if type restorecon >/dev/null 2>&1; then
restorecon -F .ssh ${AUTH_KEY_FILE};
restorecon -F $(dirname "${AUTH_KEY_FILE}") ${AUTH_KEY_FILE};
fi
EOF
)