src.nth.io/

summaryrefslogtreecommitdiff
path: root/openhop/repeater/templates/openhop-repeater.service.j2
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2026-08-10 21:11:03 -0500
committerLuke Hoersten <[email protected]>2026-08-10 21:11:03 -0500
commit440f01ea7de8dabf01480c381ff53c67922720b2 (patch)
tree7b7c8c95a96f37eaf458a9acd2bbb35e2d52aaff /openhop/repeater/templates/openhop-repeater.service.j2
parent3610744c6a2324cbffeb49bd2e8a2b7c58a2e9e6 (diff)
openhop/repeater: gate service start on the data-dir mountHEADmain
Add RequiresMountsFor to the systemd unit so the daemon does not start before the storage backing the data dir (and thus the identity file) is mounted, which would make it generate a fresh keypair onto the bare mountpoint. Derives from the data dir path, so it resolves to the root mount (a no-op) when the data dir lives on the SD card.
Diffstat (limited to 'openhop/repeater/templates/openhop-repeater.service.j2')
-rw-r--r--openhop/repeater/templates/openhop-repeater.service.j25
1 files changed, 5 insertions, 0 deletions
diff --git a/openhop/repeater/templates/openhop-repeater.service.j2 b/openhop/repeater/templates/openhop-repeater.service.j2
index 53aa737..a9b6564 100644
--- a/openhop/repeater/templates/openhop-repeater.service.j2
+++ b/openhop/repeater/templates/openhop-repeater.service.j2
@@ -2,6 +2,11 @@
Description=openHop MeshCore Repeater
After=network-online.target
Wants=network-online.target
+# Block startup until the storage backing the data dir (and thus the node
+# identity file) is mounted, so the daemon loads the real keypair instead of
+# generating a fresh one onto the bare mountpoint. Resolves to the root mount
+# (harmless) when the data dir lives on the SD card.
+RequiresMountsFor={{repeater_data_dir}}
[Service]
Type=simple