summaryrefslogtreecommitdiffstats
path: root/bin/copy-secrets
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-06-24 20:19:59 +0200
committertv <tv@shackspace.de>2015-06-24 20:19:59 +0200
commita9aaf3c9b1c3fedbd73f4187ff41712b9d56ed41 (patch)
tree85660db2f14b21bcf42ed7ad2f49d3b50493ab5c /bin/copy-secrets
parentb8dab2b12b5235e85da41e48a08ad6aff3249afb (diff)
copy-secrets: use rsync command like in rsyncfiles
Diffstat (limited to 'bin/copy-secrets')
-rwxr-xr-xbin/copy-secrets7
1 files changed, 6 insertions, 1 deletions
diff --git a/bin/copy-secrets b/bin/copy-secrets
index b6b93b616..50a0e1982 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 <<EOF
set -euf