copy-secrets: only chown existing secrets
This commit is contained in:
parent
d4ca5907d6
commit
41912f0452
@ -25,6 +25,18 @@ rsync -cz --chown=0:0 -vr "$secrets_rsync/" "$target:/"
|
||||
|
||||
ssh "$target" -T <<EOF
|
||||
set -euf
|
||||
! test -f $retiolum_secret || chown -v $retiolum_uid:0 $retiolum_secret
|
||||
! test -f $ejabberd_secret || chown -v $ejabberd_uid:0 $ejabberd_secret
|
||||
|
||||
retiolum_secret=${retiolum_secret-}
|
||||
retiolum_uid=${retiolum_uid-}
|
||||
ejabberd_secret=${ejabberd_secret-}
|
||||
ejabberd_uid=${ejabberd_uid-}
|
||||
|
||||
if test -n "\$retiolum_secret"; then
|
||||
chown -v "\$retiolum_uid:0" "\$retiolum_secret"
|
||||
fi
|
||||
|
||||
if test -n "\$ejabberd_secret"; then
|
||||
chown -v "\$ejabberd_uid:0" "\$ejabberd_secret"
|
||||
fi
|
||||
|
||||
EOF
|
||||
|
Loading…
Reference in New Issue
Block a user