25 lines
747 B
Plaintext
25 lines
747 B
Plaintext
function zssh_process()
|
|
{
|
|
if [[ -n "$zssh_host" ]]
|
|
then
|
|
if [[ ${#zssh_host_config_accesses} -gt 0 ]]
|
|
then
|
|
zshlibs_log zssh_server "processing ssh server setup"
|
|
# - if there is no generated ssh config,
|
|
# - if local config not older than (means newer than) generated config
|
|
# then generate ssh config
|
|
if ! [[ "${HOME}/.config/zsh/local.config.zsh" -ot $(zssh_host_info -c) ]]
|
|
then
|
|
zshlibs_log zssh_server "publishing our configs …"
|
|
zssh_publish_configs
|
|
else
|
|
zshlibs_log zssh_server "no need to publish our configs"
|
|
fi
|
|
zssh_check_pubkeys
|
|
fi
|
|
zshlibs_log zssh_client "processing ssh client setup"
|
|
zssh_install_peers
|
|
zssh_publish_pubkeys
|
|
fi
|
|
}
|