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