diff --git a/README.md b/README.md index d7e3a702..5fbebcb5 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ below for usage and instructions. - [Duck DNS](/docs/duckdns.md) - [Hassbian](/docs/hassbian.md) - [Home Assistant](/docs/homeassistant.md) + - [Homebridge](/docs/homebridge.md) - [HUE](/docs/hue.md) - [LibCEC](/docs/libcec.md) - [MariaDB](/docs/mariadb.md) diff --git a/docs/homebridge.md b/docs/homebridge.md new file mode 100644 index 00000000..5269849e --- /dev/null +++ b/docs/homebridge.md @@ -0,0 +1,15 @@ +# Description + +**Installation of this script has been deprecated in favor of the +[`homekit` component](homekit_component)** + +This script only removes a previously installed installation of homebridge. + +## Remove + +```bash +sudo hassbian-config remove homebridge +``` + + +[homekit_component]:https://www.home-assistant.io/components/homekit/ diff --git a/package/opt/hassbian/suites/homebridge.sh b/package/opt/hassbian/suites/homebridge.sh new file mode 100644 index 00000000..6af26080 --- /dev/null +++ b/package/opt/hassbian/suites/homebridge.sh @@ -0,0 +1,38 @@ +#!/bin/bash +function homebridge-show-short-info { + echo "Removes Homebridge from this system." +} + +function homebridge-show-long-info { + echo "Removes Homebridge from this system." +} + +function homebridge-show-copyright-info { + echo "Original concept by Ludeeus ." +} + +function homebridge-install-package { + echo "The installation of homebrige has been deprecated in favor of the 'homekit' component." + echo "To remove homebridge from this system run 'sudo hassbian-config remove homebridge.'" +} + +function homebridge-remove-package { + echo "Starting removal of Homebridge." + + echo "Removing service." + systemctl stop homebridge.service + systemctl disable homebridge.service + rm /etc/systemd/system/homebridge.service + systemctl daemon-reload + + echo "Removing the homebridge user." + deluser --remove-home homebridge + + echo "Removing homebridge." + npm remove -g homebridge-homeassistant + npm remove -g --unsafe-perm homebridge hap-nodejs node-gyp + + return 0 +} + +[[ "$_" == "$0" ]] && echo "hassbian-config helper script; do not run directly, use hassbian-config instead"