Parcourir la source

feat(systemd): Add the systemd service for the speedtest pod

Signed-off-by: Jeremy MAURO <jeremy.mauro@gmail.com>
Jeremy MAURO il y a 2 ans
Parent
commit
5386f3bec6
1 fichiers modifiés avec 20 ajouts et 0 suppressions
  1. 20 0
      speedtest.systemd

+ 20 - 0
speedtest.systemd

@@ -0,0 +1,20 @@
+[Unit]
+Description=Podman pod-speedtest.service
+Documentation=https://www.underkube.com/posts/2021-01-28-nextcloud-podman-rootless-systemd-part-v-nextcloud-pod/#systemd-unit
+
+[Service]
+Restart=on-failure
+RestartSec=30
+Type=simple
+RemainAfterExit=yes
+TimeoutStartSec=30
+
+ExecStartPre=/usr/local/bin/podman pod rm -f -i speedtest
+ExecStart=/usr/local/bin/podman play kube \
+  /data/repository/speedtest/kube.yml
+
+ExecStop=/usr/local/bin/podman pod stop speedtest
+ExecStopPost=/usr/local/bin/podman pod rm speedtest
+
+[Install]
+WantedBy=default.target