Code cleanup #33

Manually merged
jlecour merged 71 commits from jlecour-refactoring into master 2020-04-17 15:32:41 +02:00
Showing only changes of commit c7816abd1e - Show all commits

View file

@ -22,8 +22,8 @@ if [ -z "${keyfile}" ]; then
cat "${jail_path}/${AUTHORIZED_KEYS}"
fi
else
[ -e "${keyfile}" ] || error "Keyfile ${keyfile} dosen't exist !"
test -r "${keyfile}" || error "${jail_name}: SSH key '${keyfile}' is missing or is not readable."
cat "${keyfile}" > "${jail_path}/${AUTHORIZED_KEYS}"
chmod 600 "${jail_path}/${AUTHORIZED_KEYS}"
notice "${jail_name}: update key => ${keyfile}"
notice "${jail_name}: SSH key has been updated with ${keyfile}"
fi