small update for key mailer

This commit is contained in:
accel 2021-12-20 18:07:07 +03:00
parent 8a103c9154
commit 24a504328c

View File

@ -133,9 +133,9 @@ function zssh_mail_pubkey2()
{
[[ -n $zssh_host ]] || return 63
ssh_node="$1"
ztools_ensure -d $(zssh_node_info ${ssh_node} -K)
if ! [[ $(zssh_node_info ${ssh_node} -k) -ot "$(zssh_node_info ${ssh_node} -K)/$zssh_host.key.pub" ]]
then
ztools_ensure -d $(zssh_node_info ${ssh_node} -K)
zbootstrap_message zssh "sending '$(zssh_node_info ${ssh_node} -k) to '$(zssh_node_info ${ssh_node} -K ${zssh_host})'"
cp $(zssh_node_info ${ssh_node} -k) (zssh_node_info ${ssh_node} -K ${zssh_host})
else