2018-08-20 19:19:56 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
if [ -f "/etc/default/acme_sh_request_env" ] ; then
|
|
|
|
. "/etc/default/acme_sh_request_env"
|
|
|
|
else
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -f "$ACME_SH_ENV_FILE" ] ; then
|
|
|
|
. "$ACME_SH_ENV_FILE"
|
|
|
|
else
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2018-09-12 16:59:48 +02:00
|
|
|
chown -R acme:acme "$ACME_SH_HOME"
|
|
|
|
sudo -u acme -s /bin/bash /usr/local/bin/acme-sh-cron-command
|
2018-08-20 19:19:56 +02:00
|
|
|
|
|
|
|
if [ "$ACME_SH_INSTALL_CERTS" == "True" ] ; then
|
|
|
|
$ACME_SH_BIN $ACME_SH_INSTALL_CERT_REQUEST > "$ACME_SH_INSTALL_LOG_FILE" 2>&1
|
2018-09-12 16:59:48 +02:00
|
|
|
chown -R acme:acme "$ACME_SH_HOME"
|
2018-08-20 19:19:56 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit $?
|