From bae6f804e967efcbbad639353178a2ae58e5de76 Mon Sep 17 00:00:00 2001 From: Scott Hunter Date: Sat, 4 Apr 2020 20:48:40 -0700 Subject: [PATCH] Update linux.ts Added "Wants=network-online.target" to the file. This sets a "dependency" that the networking online starts before Homebridge. From "man systemd.unit - It is a common pattern to include a unit name in both the After= and Requires/Wants= options, in which case the unit listed will be started before the unit that is configured with these options". In my case my Raspberry Pi sometimes starts homebridge plugins before the network is fully up leading to gethostaddr errors. --- src/bin/platforms/linux.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/platforms/linux.ts b/src/bin/platforms/linux.ts index e127fecb5..bac2d255b 100644 --- a/src/bin/platforms/linux.ts +++ b/src/bin/platforms/linux.ts @@ -344,6 +344,7 @@ export class LinuxInstaller { const serviceFile = [ `[Unit]`, `Description=${this.hbService.serviceName}`, + `Wants=network-online.target`, `After=syslog.target network-online.target`, '', `[Service]`,