Last active
May 23, 2024 16:15
-
-
Save johannrichard/0ad0de1feb6adb9eb61a to your computer and use it in GitHub Desktop.
Systemd Service for homebridge (http://github.com/nfarina/homebridge)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Defaults / Configuration options for homebridge | |
# The following settings tells homebridge where to find the config.json file and where to persist the data (i.e. pairing and others) | |
HOMEBRIDGE_OPTS=-U /var/lib/homebridge | |
# If you uncomment the following line, homebridge will log more | |
# You can display this via systemd's journalctl: journalctl -f -u homebridge | |
# DEBUG=* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Node.js HomeKit Server | |
After=syslog.target network-online.target | |
[Service] | |
Type=simple | |
User=homebridge | |
EnvironmentFile=/etc/default/homebridge | |
# Adapt this to your specific setup (could be /usr/bin/homebridge) | |
# See comments below for more information | |
ExecStart=/usr/local/bin/homebridge $HOMEBRIDGE_OPTS | |
Restart=on-failure | |
RestartSec=10 | |
KillMode=process | |
[Install] | |
WantedBy=multi-user.target |
esgie
commented
Nov 1, 2020
•
Note for systemd users: Your start service needs to start the
NetworkManager-wait-online.service
before being able to wait after it is finished:[Unit] Description=Node.js HomeKit Server Wants=network-online.target After=syslog.target network-online.target
See https://unix.stackexchange.com/a/126146 for details.
This was the solution for me - thank you fuerst!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment