summarylogtreecommitdiffstats
path: root/skywire-sd.service
diff options
context:
space:
mode:
Diffstat (limited to 'skywire-sd.service')
-rw-r--r--skywire-sd.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/skywire-sd.service b/skywire-sd.service
new file mode 100644
index 000000000000..55a244d0f2e5
--- /dev/null
+++ b/skywire-sd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Skywire service-discovery service
+Wants=network-online.target redis.service postgresql.service
+
+[Service]
+Type=simple
+ExecStartPre=/bin/bash -c '[[ ! -f /etc/skywire-sd.conf ]] && skywire cli config gen-keys | tee /etc/skywire-sd.conf || true'
+ExecStart=/bin/bash -c 'skywire svc sd --sk $$(tail -n1 /etc/skywire-sd.conf)'
+Restart=always
+RestartSec=20
+TimeoutSec=30
+
+[Install]
+WantedBy=multi-user.target