]> gitweb.fluxo.info Git - hydra.git/commitdiff
Deploy: set --homedir=/root/.gnupg when testing for gpg keys
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Jun 2018 11:28:17 +0000 (08:28 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 7 Jun 2018 11:28:17 +0000 (08:28 -0300)
share/hydra/deploy

index 1219efd2e586fa7feff002655c5924f7358cb0fb..c20eee2212164559b8fecd1d6f36bf751d1ff3ab 100755 (executable)
@@ -153,7 +153,7 @@ for node in $NODES; do
     # Import keys if needed
     if ! $SUDO test -f /root/.ssh/id_rsa     || \
        ! $SUDO test -f /root/.config/borg/hydra/key || \
-       ! $SUDO gpg --list-secret-keys root@$FQDN &> /dev/null; then
+       ! $SUDO gpg --homedir=/root/.gnupg --list-secret-keys root@$FQDN &> /dev/null; then
       hydra $HYDRA import-keys $FQDN
     fi
   else
@@ -244,7 +244,7 @@ EOF
     # Import keys if needed
     if ! $HYDRA_CONNECT $FQDN sudo test -f /root/.ssh/id_rsa     || \
        ! $HYDRA_CONNECT $FQDN sudo test -f /root/.config/borg/hydra/key || \
-       ! $HYDRA_CONNECT $FQDN sudo gpg --list-secret-keys root@$FQDN &> /dev/null; then
+       ! $HYDRA_CONNECT $FQDN sudo gpg --homedir=/root/.gnupg --list-secret-keys root@$FQDN &> /dev/null; then
       hydra $HYDRA import-keys $FQDN
     fi
   fi