entrypoint.sh 536 B

12345678910111213141516
  1. #!/bin/bash
  2. #Убиваем все что осталось с прошлого раза
  3. [ -d /pki ] && rm -rf /pki
  4. [ -f /var/lib/acme-dns/acme-dns.db ] && rm -f /var/lib/acme-dns/acme-dns.db
  5. GIT_SSH_COMMAND='ssh -i /tmp/keyfile -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' git clone ${git_url}
  6. if [ $? == '0' ];then
  7. # Производим рестор БД
  8. zcat /pki/iru/wild/infoclinica.ru.dump.gz | sqlite3 /var/lib/acme-dns/acme-dns.db
  9. else
  10. echo "Cannot git clone the ${git_url}"; exit 1
  11. fi
  12. exec "$@"