31 lines
1.3 KiB
Plaintext
31 lines
1.3 KiB
Plaintext
function zssh_configure ()
|
|
{
|
|
if [[ -n "$zssh_host" ]]
|
|
then
|
|
zshlibs_log zssh_configure "zssh_host is set"
|
|
zshlibs_ensure -d $zssh_private_keys
|
|
zshlibs_ensure -d $zssh_private_configs
|
|
zshlibs_ensure -d ${zssh_global_configs}
|
|
zshlibs_ensure -d ${zssh_global_pubkeys}
|
|
if ! [[ -d "${zssh_private_configs}" ]]
|
|
then
|
|
echo 'Include config.d/*.sshconf' > "${zssh_ssh_dotdir}/config_d"
|
|
fi
|
|
zssh_enumeratenodes
|
|
if [[ ${#zssh_host_config_accesses} -gt 0 ]]
|
|
then
|
|
zshlibs_log zssh_configure "zssh_host_config_accesses is set"
|
|
zshlibs_log zssh_configure "global our pubkey directory is $(zssh_host_info -K)"
|
|
zshlibs_log zssh_configure "global our config directory is $(zssh_host_info -c)"
|
|
typeset -g zssh_global_config_hostdir="${zssh_global_configs}/${zssh_host}"
|
|
typeset -g zssh_global_pubkey_hostdir="${zssh_global_pubkeys}/${zssh_host}"
|
|
zshlibs_ensure -d $(zssh_host_info -K) #"${zssh_global_pubkey_hostdir}"
|
|
zshlibs_ensure -d $(zssh_host_info -C) # "${zssh_global_config_hostdir}"
|
|
else
|
|
zshlibs_log zssh_configure "zssh_host_config_accesses is NOT set, not going to bother accepting keys"
|
|
fi
|
|
else
|
|
zshlibs_log zssh_configure "zssh_host is NOT set, which means we cannot neither publish keys nor accept them"
|
|
fi
|
|
}
|