Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • 133-fail2ban-page
  • reorganisation
  • 16-maintenace-service
  • 11-fail2ban
  • 6-monit-update
  • 7-dolibarr-fail2ban
  • 6-surveillance-interne-des-serveur
  • test-glpi
  • 2-migrate-to-phpfpm
  • jessie
  • github
12 results

expandCertbot.sh

Blame
  • expandCertbot.sh 454 B
    #!/bin/bash
    if [ -z "$2" ]
    then
    	echo "usage $0 additional-dommains certificate"
    	echo "additional-domains : comma separated list of domains"
    	echo "expand the existing certificate with the given domains"
    	exit 1
    fi
    domains="`openssl x509  -in $2 -inform pem -noout -text | grep DNS | sed -e 's/  *//g' -e 's/DNS://g'`,$1"
    
    echo "Requesting certificate for domains: '$domains'"
    certbot certonly --expand --apache --must-staple --hsts --domains=$domains