]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
fcron: Fix invalid syntax in update-location-database cronjob
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Sep 2020 10:08:41 +0000 (10:08 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 24 Sep 2020 17:40:20 +0000 (17:40 +0000)
Fixes: #12484
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/cron/crontab
config/rootfiles/core/150/update.sh

index 331eaa4a50db1bb962b701a4ab4dbae90c174bd0..1a1939336e4cb81a1a075157e1e75593e96f4f2b 100644 (file)
@@ -60,7 +60,7 @@ HOME=/
 00 2 * 10-11 0      /usr/local/bin/timezone-transition /usr/local/bin/firewallctrl
 
 # Update location database once a month
-%hourly,random * * * [ -f "/var/ipfire/red/active" ] && /usr/local/bin/update-location-database >/dev/null 2>&1
+%hourly,random * [ -f "/var/ipfire/red/active" ] && /usr/local/bin/update-location-database >/dev/null 2>&1
 
 # Retry sending spooled mails regularly
 %hourly * /usr/sbin/dma -q
index c125c058cc5adf6498d8f5473c33a81ab18bd3a6..cb8d5326113dce5e0e115349e4a9bb00841e8fc3 100644 (file)
@@ -103,6 +103,11 @@ ldconfig
 # Filesytem cleanup
 /usr/local/bin/filesystem-cleanup
 
+# Fix invalid cronjob syntax
+sed -e "s/^%hourly,random \* \* \*/%hourly,random */g" \
+       -i /var/spool/cron/root.orig
+fcrontab -z
+
 # Start services
 /etc/init.d/collectd start