Browse Source

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.
pull/120/head
Fabian Grünbichler 9 years ago
parent
commit
8f7492b447
  1. 4
      le.sh

4
le.sh

@ -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
} }

Loading…
Cancel
Save