|
@@ -1,24 +1,18 @@
|
|
|
#!/bin/bash
|
|
|
|
|
|
-#Убиваем все что осталось с прошлого раза
|
|
|
-[ -d /pki ] && rm -rf /pki
|
|
|
-#[ -f /var/lib/acme-dns/acme-dns.db ] && rm -f /var/lib/acme-dns/acme-dns.db
|
|
|
echo "$SSHKEY" > /tmp/keyfile
|
|
|
chmod 0400 /tmp/keyfile
|
|
|
|
|
|
GIT_SSH_COMMAND='ssh -i /tmp/keyfile -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' git clone ${git_url}
|
|
|
|
|
|
-if [ $? != '0' ]
|
|
|
+if [ $? == '0' ]
|
|
|
then
|
|
|
- echo "Cannot git clone the ${git_url}"; exit 1
|
|
|
-# Производим рестор БД
|
|
|
-# zcat /pki/iru/wild/infoclinica.ru.dump.gz | sqlite3 /var/lib/acme-dns/acme-dns.db
|
|
|
-# chmod 0600 /var/lib/acme-dns/acme-dns.db
|
|
|
-# Подкидываем конфигурационные файлы
|
|
|
-# cp /pki/iru/wild/acme-dns/infoclinica.ru.config.cfg /etc/acme-dns/config.cfg
|
|
|
-else
|
|
|
echo "git clone the ${git_url} done"
|
|
|
- echo "Starting ACME-DNS"
|
|
|
+ echo "All tasks complete!!!"
|
|
|
+ echo "Attention! Before generate or renew certificates manual"
|
|
|
+ echo "Please read https://git.sdsys.ru/sdsys/pki/src/master/iru/wild/acme-dns/README.md"
|
|
|
+else
|
|
|
+ echo "Cannot git clone the ${git_url}"; exit 1
|
|
|
fi
|
|
|
|
|
|
exec "$@"
|