From fe7f9a1f3187d2558a9269f8b0abfb89ba5981c9 Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 10 Jul 2015 20:58:55 +0200 Subject: tv.consul: init --- bin/copy-secrets | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bin') diff --git a/bin/copy-secrets b/bin/copy-secrets index 24685ede0..f40493599 100755 --- a/bin/copy-secrets +++ b/bin/copy-secrets @@ -32,6 +32,11 @@ case $(nixos-query services.ejabberd-cd.enable 2>/dev/null) in true) ejabberd_uid=$(nixos-query users.extraUsers.ejabberd.uid) esac +case $(nixos-query tv.consul.enable 2>/dev/null) in true) + consul_secret=$(nixos-query tv.consul.encrypt-file) + consul_uid=$(nixos-query users.extraUsers.consul.uid) +esac + (set -x rsync \ --rsync-path="mkdir -p \"$2\" && rsync" \ @@ -46,6 +51,8 @@ retiolum_secret=${retiolum_secret-} retiolum_uid=${retiolum_uid-} ejabberd_secret=${ejabberd_secret-} ejabberd_uid=${ejabberd_uid-} +consul_secret=${consul_secret-} +consul_uid=${consul_uid-} if test -n "\$retiolum_secret"; then chown -v "\$retiolum_uid:0" "\$retiolum_secret" @@ -55,4 +62,8 @@ if test -n "\$ejabberd_secret"; then chown -v "\$ejabberd_uid:0" "\$ejabberd_secret" fi +if test -n "\$consul_secret"; then + chown -v "\$consul_uid:0" "\$consul_secret" +fi + EOF -- cgit v1.2.3