mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-08 05:31:55 +00:00
23 lines
573 B
Bash
Executable File
23 lines
573 B
Bash
Executable File
#!/bin/sh
|
|
|
|
echo "Uninstalling Homebridge..."
|
|
# make forever stop the app.
|
|
forever stop homebridge > /dev/null 2>&1
|
|
|
|
if [[ "$OSTYPE" == "linux*" ]]; then
|
|
## uninstall for linux
|
|
|
|
# stop the service.
|
|
sudo /etc/init.d/homebridge stop
|
|
|
|
# remove the service from launching at boot.
|
|
sudo update-rc.d -f homebridge remove
|
|
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
## uninstall for OS X
|
|
|
|
# tell launchd to stop the process.
|
|
launchctl unload ~/Library/LaunchAgents/org.homebridge.plist
|
|
# remove the launchd script.
|
|
rm ~/Library/LaunchAgents/org.homebridge.plist
|
|
fi
|