diff options
author | Martin Stensgård <mastensg@mastensg.net> | 2025-07-22 23:22:32 +0200 |
---|---|---|
committer | Martin Stensgård <mastensg@mastensg.net> | 2025-07-22 23:22:32 +0200 |
commit | 48291fc94662b937594a3b7f3838b5844a186446 (patch) | |
tree | 24c622ade1c5772852ef02aac7b143a38065cf1f | |
parent | dda888e121d95e36b5740cceb5217fd5ff5afdc7 (diff) |
systemd: add services and timer
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | systemd/opplysning-forfrisk.service | 6 | ||||
-rw-r--r-- | systemd/opplysning-forfrisk.timer | 9 | ||||
-rw-r--r-- | systemd/opplysning-vis.service | 9 |
4 files changed, 28 insertions, 0 deletions
@@ -33,6 +33,10 @@ install: all cp -f font/BellCentennialStd-Address.ttf /opt/opplysning/font/ cp -f font/adventpro-bold.ttf /opt/opplysning/font/ mkdir -p /opt/opplysning/var + cp -f systemd/opplysning-forfrisk.service /lib/systemd/system + cp -f systemd/opplysning-forfrisk.timer /lib/systemd/system + cp -f systemd/opplysning-vis.service /lib/systemd/system + systemctl daemon-reload .PHONY: all check clean install diff --git a/systemd/opplysning-forfrisk.service b/systemd/opplysning-forfrisk.service new file mode 100644 index 0000000..e3542f8 --- /dev/null +++ b/systemd/opplysning-forfrisk.service @@ -0,0 +1,6 @@ +[Unit] +Description=Forfrisk opplysninger + +[Service] +Type=simple +ExecStart=/opt/opplysning/bin/opplysning-forfrisk diff --git a/systemd/opplysning-forfrisk.timer b/systemd/opplysning-forfrisk.timer new file mode 100644 index 0000000..ba4000e --- /dev/null +++ b/systemd/opplysning-forfrisk.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Forfrisk opplysninger ved oppstart, og hvert femte minutt + +[Timer] +OnBootSec=1min +OnUnitActiveSec=5min + +[Install] +WantedBy=timers.target diff --git a/systemd/opplysning-vis.service b/systemd/opplysning-vis.service new file mode 100644 index 0000000..9b25f68 --- /dev/null +++ b/systemd/opplysning-vis.service @@ -0,0 +1,9 @@ +[Unit] +Description=Vis fram opplysninger + +[Service] +Type=simple +ExecStart=/opt/opplysning/bin/opplysning-vis + +[Install] +WantedBy=multi-user.target |