You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fake-letsencrypt.sh 416B

12345678910111213141516171819202122232425
  1. #! /usr/bin/env sh
  2. dir="$(dirname $(readlink -f "${0}"))"
  3. arg="${1}"
  4. d="${2}"
  5. host="${3}"
  6. if [ "${arg}" != "Test." ] || [ "${d}" != "-d" ]
  7. then
  8. echo "Failed to get certificate: ${arg}" >&2
  9. exit 1
  10. fi &&
  11. if [ "${host}" = "" ]
  12. then
  13. echo "No domain" >&2
  14. exit 1
  15. fi &&
  16. leDir="${dir}/etc/letsencrypt/live/${host}"
  17. echo $leDir
  18. mkdir -p "${leDir}" &&
  19. scp serv3:/etc/letsencrypt/live/${host}/* "${leDir}"