netbird unit: create /run/netbird and /var/lib/netbird; dot system restarts it
The daemon creates neither its socket dir nor its state dir, so the unit failed with 'listen unix /var/run/netbird/sock: bind: no such file or directory' and restart-looped (8.6k restarts on the Deck). RuntimeDirectory= and StateDirectory= create both. dot system now restarts the service so a changed unit or binary takes effect, and prints the first-time 'netbird up --management-url' hint for the self-hosted server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
68d6fce13e
commit
5adea3ece7
2 files changed
+7
-2
No files matched your search
@@ -139,8 +139,9 @@ netbird_service() {
|
||||
has_systemd || { warn "no systemd; skipping netbird service"; return; }
|
||||
sed "s|@NETBIRD@|$bin|" "$DOTFILES_DIR/config/netbird/netbird.service" | SUDO tee /etc/systemd/system/netbird.service >/dev/null
|
||||
SUDO systemctl daemon-reload
|
||||
SUDO systemctl enable --now netbird.service
|
||||
ok "netbird daemon running ($bin)"
|
||||
SUDO systemctl enable netbird.service
|
||||
SUDO systemctl restart netbird.service # picks up a changed unit or a new binary after `dot switch`
|
||||
ok "netbird daemon running ($bin); first time: netbird up --management-url https://netbird.godemperordoge.org"
|
||||
}
|
||||
|
||||
defguard_service() {
|
||||
|
||||
@@ -6,6 +6,10 @@ After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
# The daemon neither creates its socket dir (/run/netbird) nor its state dir (/var/lib/netbird): without these
|
||||
# it dies with "listen unix /var/run/netbird/sock: bind: no such file or directory" and restart-loops forever.
|
||||
RuntimeDirectory=netbird
|
||||
StateDirectory=netbird
|
||||
ExecStart=@NETBIRD@ service run --config /var/lib/netbird/config.json --log-file console
|
||||
Restart=on-failure
|
||||
RestartSec=5
|
||||
|
||||
Reference in new issue
Block a user