From 718a8885384149a14f734e0d4a5cba99b997a3d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sachse?= <joerg.sachse@slub-dresden.de> Date: Thu, 11 Apr 2024 13:56:29 +0200 Subject: [PATCH] fix: use time syntax that jurassic systemd on RHEL 7 actually supports --- .../systemd/system/rosetta_maintenance_begin.timer.j2 | 10 ++++++++-- .../systemd/system/rosetta_maintenance_end.timer.j2 | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/templates/usr/local/lib/systemd/system/rosetta_maintenance_begin.timer.j2 b/templates/usr/local/lib/systemd/system/rosetta_maintenance_begin.timer.j2 index 32991bc..bcbf33a 100644 --- a/templates/usr/local/lib/systemd/system/rosetta_maintenance_begin.timer.j2 +++ b/templates/usr/local/lib/systemd/system/rosetta_maintenance_begin.timer.j2 @@ -4,8 +4,14 @@ Description=timer for rosetta_maintenance.service [Timer] # run on the 1st Tuesday of each month # You can validate your calendar expressions using `systemd-analyze calendar EXPR`. -OnCalendar=Tue *-*-01..07 08:00:00 -Unit=rosetta_maintenance_begin +# Of course, the expression we use on our Debian systems won't work on the +# jurassic RHEL versions of systemd 219, because the ".." syntax for timespans +# in calendar events isn't supported yet. Instead, we have to use the older +# syntax that explicitely lists all days separated by commas. +# One more reason for RHEL to fuck ALL THE WAY OFF! +# OnCalendar=Tue *-*-01..07 08:00:00 # NOT THIS on RHEL 7! +OnCalendar=Tue *-*-01,02,03,04,05,06,07 08:00:00 +Unit=rosetta_maintenance_begin.service [Install] WantedBy=default.target diff --git a/templates/usr/local/lib/systemd/system/rosetta_maintenance_end.timer.j2 b/templates/usr/local/lib/systemd/system/rosetta_maintenance_end.timer.j2 index 7a5522d..da46ac3 100644 --- a/templates/usr/local/lib/systemd/system/rosetta_maintenance_end.timer.j2 +++ b/templates/usr/local/lib/systemd/system/rosetta_maintenance_end.timer.j2 @@ -4,7 +4,13 @@ Description=timer for rosetta_maintenance.service [Timer] # run on the 1st Tuesday of each month # You can validate your calendar expressions using `systemd-analyze calendar EXPR`. -OnCalendar=Tue *-*-01..07 11:00:00 +# Of course, the expression we use on our Debian systems won't work on the +# jurassic RHEL versions of systemd 219, because the ".." syntax for timespans +# in calendar events isn't supported yet. Instead, we have to use the older +# syntax that explicitely lists all days separated by commas. +# One more reason for RHEL to fuck ALL THE WAY OFF! +# OnCalendar=Tue *-*-01..07 08:00:00 # NOT THIS on RHEL 7! +OnCalendar=Tue *-*-01,02,03,04,05,06,07 11:00:00 Unit=exlibris.service [Install] -- GitLab