29 lines
673 B
Plaintext
29 lines
673 B
Plaintext
|
#!/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
|
||
|
|
||
|
chown -R acme:acme "$ACME_SH_HOME"
|
||
|
if [ "$ACME_SH_HTTP_BIND_PORT" -eq 80 ] && [ "$ACME_SH_USE_DNS_PROVIDER" == "False" ] ; then
|
||
|
/usr/local/bin/acme-sh-cron-command
|
||
|
chown -R acme:acme "$ACME_SH_HOME"
|
||
|
else
|
||
|
sudo -u acme -s /bin/bash /usr/local/bin/acme-sh-cron-command
|
||
|
fi
|
||
|
|
||
|
if [ "$ACME_SH_INSTALL_CERTS" == "True" ] ; then
|
||
|
$ACME_SH_BIN $ACME_SH_INSTALL_CERT_REQUEST > "$ACME_SH_INSTALL_LOG_FILE" 2>&1
|
||
|
chown -R acme:acme "$ACME_SH_HOME"
|
||
|
fi
|
||
|
|
||
|
exit $?
|