aboutsummaryrefslogtreecommitdiffstats
path: root/templates/ingress/etc_crontab.j2
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-10-18 23:54:14 +0300
committerJan Tuomi <jan@jantuomi.fi>2025-10-18 23:54:14 +0300
commitfea0aff43b6c7cc14ba848f97afb17999ff65c17 (patch)
treee9d570cb8f7bf31d179ec70dcc2f2c578ff888ab /templates/ingress/etc_crontab.j2
parent468c528ccf05ec448328882e0ee7d69683666309 (diff)
Add goaccess to ingress
Diffstat (limited to 'templates/ingress/etc_crontab.j2')
-rw-r--r--templates/ingress/etc_crontab.j23
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/ingress/etc_crontab.j2 b/templates/ingress/etc_crontab.j2
index 46d6b93..e0c3d4e 100644
--- a/templates/ingress/etc_crontab.j2
+++ b/templates/ingress/etc_crontab.j2
@@ -15,3 +15,6 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
{% for elem in hetzner_zone_record_ids %}
* * * * * root /usr/local/bin/hetzner_ddns.sh --zone-id '{{ elem.zone_id }}' --record-id '{{ elem.record_id }}' --record-name '{{ elem.name }}' --record-type '{{ elem.type }}' --ttl '{{ elem.ttl }}' --iface-cmd 'ifconfig epw1b' >>/var/log/hetzner_ddns.log 2>&1
{% endfor %}
+
+# Update goaccess report HTML
+0 * * * * www (cat /var/log/nginx/access.log | awk '$8=$1$8' | /usr/local/bin/goaccess --log-format=VCOMBINED -j "$(($(nproc) + 1))" --keep-last=30 -a -o /var/www/goaccess/index.html --persist --restore)