www.sh 662 Bytes
Newer Older
Daniel STAN's avatar
Daniel STAN committed
1 2
#!/bin/bash

3
DOMAINS="-d www.tudo.re -d cloud.tudo.re -d rc.tudo.re -d imap.tudo.re -d smtp.tudo.re -d my.tudo.re -d dstan.tudo.re"
4 5
DIR=/tmp/letsencrypt-auto

Daniel STAN's avatar
Daniel STAN committed
6 7 8 9
letsencrypt=/usr/bin/certbot
if [ ! -x "$letsencrypt" ]; then
    letsencrypt=/home/dstan/letsencrypt/letsencrypt-auto
fi
10 11 12 13 14
case $(/bin/hostname) in
  gladys)
  DOMAINS="$DOMAINS -d home.b2moo.fr"
  ;;

Daniel STAN's avatar
Daniel STAN committed
15 16 17 18
  cupcake)
  DOMAINS="$DOMAINS -d cupcake.tudo.re"
  ;;

19 20 21 22 23
  kugel)
  DOMAINS="$DOMAINS -d kugel.tudo.re"
  ;;
esac

Daniel STAN's avatar
Daniel STAN committed
24
mkdir -p $DIR
25
#$letsencrypt certonly -a webroot --webroot-path=$DIR $DOMAINS
Daniel STAN's avatar
Daniel STAN committed
26
#$letsencrypt renew -a webroot --webroot-path=$DIR $DOMAINS
27
$letsencrypt renew -a webroot --webroot-path=$DIR