Save ACCOUNT_CONF_PATH in crontab

Setting ACCOUNT_CONF_PATH to a non-default location when
calling le.sh install or le.sh installcronjob should have an
effect on the generated crontab entry, otherwise the cron
job runs with unexpected (default) settings.
This commit is contained in:
Fabian Grünbichler 2016-04-08 12:40:13 +02:00
parent 6cb415f57e
commit 8f7492b447

4
le.sh
View File

@ -1449,12 +1449,12 @@ installcronjob() {
_err "Can not install cronjob, le.sh not found." _err "Can not install cronjob, le.sh not found."
return 1 return 1
fi fi
crontab -l | { cat; echo "0 0 * * * LE_WORKING_DIR=\"$LE_WORKING_DIR\" $lesh cron > /dev/null"; } | crontab - crontab -l | { cat; echo "0 0 * * * LE_WORKING_DIR=\"$LE_WORKING_DIR\" ACCOUNT_CONF_PATH=\"$ACCOUNT_CONF_PATH\" $lesh cron > /dev/null"; } | crontab -
fi fi
if [ "$?" != "0" ] ; then if [ "$?" != "0" ] ; then
_err "Install cron job failed. You need to manually renew your certs." _err "Install cron job failed. You need to manually renew your certs."
_err "Or you can add cronjob by yourself:" _err "Or you can add cronjob by yourself:"
_err "LE_WORKING_DIR=\"$LE_WORKING_DIR\" $lesh cron > /dev/null" _err "LE_WORKING_DIR=\"$LE_WORKING_DIR\" ACCOUNT_CONF_PATH=\"$ACCOUNT_CONF_PATH\" $lesh cron > /dev/null"
return 1 return 1
fi fi
} }