Parcourir la source

nextcloud: clean old Let's Encrypt stuff

multi_domain
ßingen il y a 6 ans
Parent
révision
25813a5a5e
3 fichiers modifiés avec 1 ajouts et 41 suppressions
  1. +1
    -3
      README.md
  2. +0
    -2
      deploy.sh
  3. +0
    -36
      letsencrypt.sh

+ 1
- 3
README.md Voir le fichier

@@ -305,9 +305,7 @@ Need to log in as admin for the first time and enable Apps manually.

Let's Encrypt
-------------
Run the following script to enable Let's Encrypt for Nextcloud:

./letsencrypt.sh <your-stack-name>
Notice that when updating your certificate, you will need to restart haproxy container, due to [this issue](https://stackoverflow.com/a/50480260/1937418)

Own registry
------------

+ 0
- 2
deploy.sh Voir le fichier

@@ -76,5 +76,3 @@ while [ $NC_UP -eq 0 ]; do
curl http://${host}/index.nginx-debian.html 2>/dev/null | grep title | grep Welcome 1>/dev/null;
NC_UP=$((1 - $?));
done;

./letsencrypt.sh ${STACK_NAME}

+ 0
- 36
letsencrypt.sh Voir le fichier

@@ -1,36 +0,0 @@
#!/bin/bash

STACK_NAME=$1

if [ $# -eq 0 ]; then
echo "You must pass stack name as a parameter"
exit 1
fi

# ##### Add Let's Encrypt certificates ###### #
echo ""
echo "Adding Let's Encrypt certificates"

# Find Nextcloud container
SERVICE=nextcloud
host=$(docker stack ps ${STACK_NAME} | grep Running | grep ${SERVICE} | awk '{ print $4 }')
#echo Host=$host
if [ -z $host ]; then
echo "No host found!";
exit 1;
fi
# add avahi suffix
localhostname=$(cat /etc/hostname)
if [ "${localhostname}" != "${host}" ]; then
host=${host}.local
fi

container=$(ssh $host 'docker ps | grep '${SERVICE}' | cut -f1 -d" "')
#echo Container=$container
if [ -z $container ]; then
echo "Qué me estás container?!";
exit 1;
fi

# Run script in container
ssh $host "docker exec ${container} sh -c '/usr/local/bin/letsencrypt.sh'"

Chargement…
Annuler
Enregistrer