]> git.ipfire.org Git - people/amarx/ipfire-2.x.git/commitdiff
core115: Add captive portal cron jobs to updater
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Oct 2017 10:38:05 +0000 (11:38 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 5 Oct 2017 10:38:05 +0000 (11:38 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/rootfiles/core/115/update.sh

index e0ee121ce7a34141fa2d25cf392def98783a9c84..95260c88c1e69a22ef6165ce730c699fe2577b12 100644 (file)
@@ -48,6 +48,14 @@ ldconfig
 openvpnctrl -s
 openvpnctrl -sn2n
 
+grep -q "captivectrl" /var/spool/cron/root.orig || cat <<EOF >> /var/spool/cron/root.orig
+# Cleanup captive clients
+%hourly * /usr/bin/captive-cleanup
+
+# Reload captive firewall rules
+%nightly * 23-1   /usr/local/bin/captivectrl >/dev/null
+EOF
+fcrontab -z
 
 # This update need a reboot...
 #touch /var/run/need_reboot