Last active
December 29, 2018 00:27
-
-
Save paulomcnally/bc283a55c288f59034785cfedd1fa3fd to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| # which homebridge | |
| /home/pi/.nvm/versions/node/v10.14.2/bin/homebridge |
This file contains hidden or 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
| $ sudo systemctl daemon-reload | |
| $ sudo systemctl enable homebridge | |
| $ sudo systemctl start homebridge | |
| $ sudo systemctl status homebridge |
This file contains hidden or 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
| # $ sudo mkdir -p /var/homebridge | |
| # $ sudo chown -R homebridge:homebridge /var/homebridge | |
| # $ sudo chmod 777 -R /var/homebridge | |
| # $ sudo mkdir -p /etc/default/ | |
| # create this file | |
| # sudo touch /etc/default/homebridge | |
| # 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/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 hidden or 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
| # /etc/systemd/system/homebridge.service | |
| [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=/home/pi/.nvm/versions/node/v10.14.2/bin/homebridge $HOMEBRIDGE_OPTS | |
| Restart=on-failure | |
| RestartSec=10 | |
| KillMode=process | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment