summaryrefslogtreecommitdiffstats
path: root/satellit_installer
diff options
context:
space:
mode:
authorSimon Rettberg2024-10-02 11:09:34 +0200
committerSimon Rettberg2024-10-02 11:09:34 +0200
commit25a070108da8a455ee97d353ef42d8fb056c0292 (patch)
tree9483c731d82437b260410d840d9150294b43a223 /satellit_installer
parent[SS?S] slx-cert: More sanity checks, add a few comments (diff)
downloadsetup-scripts-25a070108da8a455ee97d353ef42d8fb056c0292.tar.gz
setup-scripts-25a070108da8a455ee97d353ef42d8fb056c0292.tar.xz
setup-scripts-25a070108da8a455ee97d353ef42d8fb056c0292.zip
[SS?S] Make slx-cert cronjob a systemd timer so we keep logs
Diffstat (limited to 'satellit_installer')
-rw-r--r--satellit_installer/static_files/lighttpd/etc/systemd/system/slx-cert.service6
-rw-r--r--satellit_installer/static_files/lighttpd/etc/systemd/system/slx-cert.timer10
l---------satellit_installer/static_files/lighttpd/etc/systemd/system/timers.target.wants/slx-cert.timer1
-rw-r--r--satellit_installer/static_files/slxadmin/etc/cron.d/slx-admin2
4 files changed, 17 insertions, 2 deletions
diff --git a/satellit_installer/static_files/lighttpd/etc/systemd/system/slx-cert.service b/satellit_installer/static_files/lighttpd/etc/systemd/system/slx-cert.service
new file mode 100644
index 0000000..7235203
--- /dev/null
+++ b/satellit_installer/static_files/lighttpd/etc/systemd/system/slx-cert.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=Check for internal certificate expiry
+
+[Service]
+ExecStart=/opt/openslx/slx-cert --restart
+Type=oneshot
diff --git a/satellit_installer/static_files/lighttpd/etc/systemd/system/slx-cert.timer b/satellit_installer/static_files/lighttpd/etc/systemd/system/slx-cert.timer
new file mode 100644
index 0000000..e2153eb
--- /dev/null
+++ b/satellit_installer/static_files/lighttpd/etc/systemd/system/slx-cert.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Trigger certificate expiry check once a day
+
+[Timer]
+OnCalendar=01:14
+AccuracySec=600
+RandomizedDelaySec=600
+
+[Install]
+WantedBy=timers.target
diff --git a/satellit_installer/static_files/lighttpd/etc/systemd/system/timers.target.wants/slx-cert.timer b/satellit_installer/static_files/lighttpd/etc/systemd/system/timers.target.wants/slx-cert.timer
new file mode 120000
index 0000000..1ab9151
--- /dev/null
+++ b/satellit_installer/static_files/lighttpd/etc/systemd/system/timers.target.wants/slx-cert.timer
@@ -0,0 +1 @@
+../slx-cert.timer \ No newline at end of file
diff --git a/satellit_installer/static_files/slxadmin/etc/cron.d/slx-admin b/satellit_installer/static_files/slxadmin/etc/cron.d/slx-admin
index c6ae537..1e6cd11 100644
--- a/satellit_installer/static_files/slxadmin/etc/cron.d/slx-admin
+++ b/satellit_installer/static_files/slxadmin/etc/cron.d/slx-admin
@@ -5,5 +5,3 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# web-cron runs every 5 minutes
*/5 * * * * www-data /opt/openslx/slxadmin-cronscript
-# check certificate once a day
-12 1 * * * root /opt/openslx/slx-cert --restart