summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--systemd/opplysning-forfrisk.service6
-rw-r--r--systemd/opplysning-forfrisk.timer9
-rw-r--r--systemd/opplysning-vis.service9
4 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index ac4e349..e0f9f4f 100644
--- a/Makefile
+++ b/Makefile
@@ -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