From 440f01ea7de8dabf01480c381ff53c67922720b2 Mon Sep 17 00:00:00 2001 From: Luke Hoersten Date: Mon, 10 Aug 2026 21:11:03 -0500 Subject: openhop/repeater: gate service start on the data-dir mount 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. --- openhop/repeater/templates/openhop-repeater.service.j2 | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'openhop/repeater') 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 -- cgit v1.2.3