diff options
author | Simon Rettberg | 2024-10-08 12:14:44 +0200 |
---|---|---|
committer | Simon Rettberg | 2024-10-08 12:14:44 +0200 |
commit | b207cd6b7f8982566054bb173a0f201d1e94765f (patch) | |
tree | 425b5ddf213e42d5b9bf7ed04020f8d402024449 /satellit_installer | |
parent | [SS?S] Make slx-cert cronjob a systemd timer so we keep logs (diff) | |
download | setup-scripts-b207cd6b7f8982566054bb173a0f201d1e94765f.tar.gz setup-scripts-b207cd6b7f8982566054bb173a0f201d1e94765f.tar.xz setup-scripts-b207cd6b7f8982566054bb173a0f201d1e94765f.zip |
[SS?S] Make slxadmin cron script triggered by systemd timer as well
Diffstat (limited to 'satellit_installer')
4 files changed, 18 insertions, 7 deletions
diff --git a/satellit_installer/static_files/slxadmin/etc/cron.d/slx-admin b/satellit_installer/static_files/slxadmin/etc/cron.d/slx-admin deleted file mode 100644 index 1e6cd11..0000000 --- a/satellit_installer/static_files/slxadmin/etc/cron.d/slx-admin +++ /dev/null @@ -1,7 +0,0 @@ -# Trigger taskmanager init on boot - -SHELL=/bin/sh -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 diff --git a/satellit_installer/static_files/slxadmin/etc/systemd/system/slx-cron.service b/satellit_installer/static_files/slxadmin/etc/systemd/system/slx-cron.service new file mode 100644 index 0000000..3a29971 --- /dev/null +++ b/satellit_installer/static_files/slxadmin/etc/systemd/system/slx-cron.service @@ -0,0 +1,7 @@ +[Unit] +Description=SLX-Admin cron script +RefuseManualStart=yes + +[Service] +Type=oneshot +ExecStart=/opt/openslx/slxadmin-cronscript diff --git a/satellit_installer/static_files/slxadmin/etc/systemd/system/slx-cron.timer b/satellit_installer/static_files/slxadmin/etc/systemd/system/slx-cron.timer new file mode 100644 index 0000000..680c28e --- /dev/null +++ b/satellit_installer/static_files/slxadmin/etc/systemd/system/slx-cron.timer @@ -0,0 +1,10 @@ +[Unit] +Description=Trigger SLX-Admin Cron-Script + +[Timer] +OnCalendar=*:0/5 +AccuracySec=5 +RandomizedDelaySec=0 + +[Install] +WantedBy=timers.target diff --git a/satellit_installer/static_files/slxadmin/etc/systemd/system/timers.target.wants/slx-cron.timer b/satellit_installer/static_files/slxadmin/etc/systemd/system/timers.target.wants/slx-cron.timer new file mode 120000 index 0000000..9590a5c --- /dev/null +++ b/satellit_installer/static_files/slxadmin/etc/systemd/system/timers.target.wants/slx-cron.timer @@ -0,0 +1 @@ +../slx-cron.timer
\ No newline at end of file |