support install/uninstall on linux with SysVinit

This commit is contained in:
Jon Maddox
2015-09-14 23:39:42 -04:00
parent f3cab9a529
commit 950e6a8211
2 changed files with 26 additions and 4 deletions

View File

@@ -5,8 +5,13 @@ echo "Uninstalling Homebridge..."
forever stop homebridge > /dev/null 2>&1
if [[ "$OSTYPE" == "linux*" ]]; then
## install for linux
echo ""
## 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