summaryrefslogtreecommitdiff
path: root/ethercalc.service
diff options
context:
space:
mode:
Diffstat (limited to 'ethercalc.service')
-rw-r--r--ethercalc.service23
1 files changed, 23 insertions, 0 deletions
diff --git a/ethercalc.service b/ethercalc.service
new file mode 100644
index 0000000..85da327
--- /dev/null
+++ b/ethercalc.service
@@ -0,0 +1,23 @@
+[Unit]
+Description = Ethercalc container
+After = network.target
+ConditionPathExists = /srv/ethercalc
+
+[Service]
+Type = simple
+ExecStartPre = -/usr/bin/podman stop ethercalc
+
+User = ethercalc
+Group = ethercalc
+
+ExecStart = /usr/bin/podman run \
+ --rm \
+ --name ethercalc \
+ --net host \
+ -v /srv/ethercalc:/srv/ethercalc \
+ localhost/ethercalc:latest
+
+Restart = always
+
+[Install]
+WantedBy = default.target