Daily cron error message (v-update-letsencrypt-ssl)

The last days I’m getting the following error message daily from this cron job:
Cron admin@cp sudo /usr/local/hestia/bin/v-update-letsencrypt-ssl

grep: /usr/local/hestia/data/users//cron.conf: Datei oder Verzeichnis nicht gefunden

Executing v-update-letsencrypt-ssl in the terminal doesn’t bring up any error messages :thinking:

# v-update-letsencrypt-ssl
#
~# crontab -l -u admin
[email protected]
CONTENT_TYPE="text/plain; charset=utf-8"
*/2 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue restart
10 00 * * * sudo /usr/local/hestia/bin/v-update-sys-queue daily
15 02 * * * sudo /usr/local/hestia/bin/v-update-sys-queue disk
10 00 * * * sudo /usr/local/hestia/bin/v-update-sys-queue traffic
30 03 * * * sudo /usr/local/hestia/bin/v-update-sys-queue webstats
*/5 * * * * sudo /usr/local/hestia/bin/v-update-sys-queue backup
10 05 * * * sudo /usr/local/hestia/bin/v-backup-users
20 00 * * * sudo /usr/local/hestia/bin/v-update-user-stats
*/5 * * * * sudo /usr/local/hestia/bin/v-update-sys-rrd
43 5 * * * sudo /usr/local/hestia/bin/v-update-letsencrypt-ssl

Know issue haven’t got the time to check it yet

1 Like

It seems the problem is caused by the code used in v-add-letsencrypt-domain, which is called internally by v-update-letsencrypt-ssl when updating a certificate. This issue was introduced in Hestia 1.8.12.

# Adding LE autorenew cronjob
if [ -z "$(grep v-update-letsen "$HESTIA/data/users/$ROOT_USER/cron.conf")" ]; then
        min=$(generate_password '012345' '2')
        hour=$(generate_password '1234567' '1')
        echo "$min $hour * * * sudo /usr/local/hestia/bin/v-update-letsencrypt-ssl" > /etc/cron.d/hestiaweb
fi

The ROOT_USER variable is a new addition in Hestia 1.9.x, so it is not available in Hestia 1.8.x.

To fix it, replace $ROOT_USER by admin:

sed -i 's/$ROOT_USER/admin/' /usr/local/hestia/bin/v-add-letsencrypt-domain
5 Likes

Once again - big thank you @sahsanu :+1:

1 Like