From 46609845ed7e369ee78ba36f5c400cac3857ee99 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 24 Jun 2015 20:19:59 +0200 Subject: copy-secrets: use rsync command like in rsyncfiles --- bin/copy-secrets | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'bin/copy-secrets') diff --git a/bin/copy-secrets b/bin/copy-secrets index b6b93b6..50a0e19 100755 --- a/bin/copy-secrets +++ b/bin/copy-secrets @@ -21,7 +21,12 @@ retiolum_uid=$(nixos-query $system_name users.extraUsers.retiolum-tinc.uid) ejabberd_secret=$(nixos-query $system_name services.ejabberd-cd.certFile) ejabberd_uid=$(nixos-query $system_name users.extraUsers.ejabberd.uid) -rsync -cz --chown=0:0 -vr "$secrets_rsync/" "$target:/" +(set -x + rsync \ + --rsync-path="mkdir -p \"$2\" && rsync" \ + -vzrlptD \ + "$secrets_rsync/" \ + "$target:/") ssh "$target" -T <