From cb835a2d6ba73965b26cdbf019faa6cc063c1e85 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 13 Oct 2021 15:38:57 +0200 Subject: [PATCH] dyndns: Delete dyndns cron in regenconf if no dyndns domain found --- data/hooks/conf_regen/01-yunohost | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data/hooks/conf_regen/01-yunohost b/data/hooks/conf_regen/01-yunohost index 34679af07..ad10fa863 100755 --- a/data/hooks/conf_regen/01-yunohost +++ b/data/hooks/conf_regen/01-yunohost @@ -112,6 +112,9 @@ SHELL=/bin/bash # - trigger yunohost dyndns update */10 * * * * root : YunoHost DynDNS update; sleep \$((RANDOM\\%60)); ! ping -q -W5 -c1 ip.yunohost.org >/dev/null 2>&1 || test -e /var/run/moulinette_yunohost.lock || yunohost dyndns update >> /dev/null EOF + else + # (Delete cron if no dyndns domain found) + touch $pending_dir/etc/cron.d/yunohost-dyndns fi # legacy stuff to avoid yunohost reporting etckeeper as manually modified