Closed ifunlisted closed 5 years ago
Faced the same issue. I think the problem is with the usage of the node.js exec method in the code. Not a node.js expert, but this method seems to terminate the underlying command execution when the node.js server shuts down. So the first part of the command executes, shuts down the node.js server, then the second part doesn't execute.
Figured out a simple workaround. Create a script, restart.sh with contents:
`#!/bin/sh
launchctl unload ~/Library/LaunchAgents/com.homebridge.server.plist && launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist `
Then set the restart command to ~/.homebridge/restart.sh &
Thats true, I'll change the wiki accordingly.
I'm using... "restart" : "launchctl unload ~/Library/LaunchAgents/com.homebridge.server.plist && launchctl load ~/Library/LaunchAgents/com.homebridge.server.plist" ...for restart in config.json, but it doesn't seem to be working. It does work in Terminal.
When I use the Restart button on the web ui, it appears to unload fine, but then never reloads.
I'm running on a Mac, using launchd