Last active
June 12, 2019 18:52
-
-
Save dale3h/340c49ab8295876db2db73c40f99ae93 to your computer and use it in GitHub Desktop.
Hass.io Installer for Raspberry Pi 3 B+
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
#!/bin/bash | |
########################################################### | |
########################################################### | |
## ## | |
## THIS SCRIPT SHOULD ONLY BE RUN ON A RASPBERRY PI 3 B+ ## | |
## ## | |
########################################################### | |
########################################################### | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root." | |
echo "Please try again with:" | |
echo " sudo $0" | |
exit 1 | |
fi | |
requirements=("socat" "jq" "curl" "avahi-daemon" "dbus-daemon") | |
missing= | |
for cmd in ${requirements[@]}; do | |
package="$cmd" | |
[[ "$cmd" == "dbus-daemon" ]] && package="dbus" | |
[[ $(command -v "$cmd") ]] || missing="$missing$package " | |
done | |
if [[ -n "$missing" ]]; then | |
echo "Attempting install of: $missing" | |
apt-get update | |
apt-get install -y $missing | |
fi | |
if [[ ! $(command -v docker) ]]; then | |
curl -sSL https://get.docker.com | sh | |
fi | |
requirements=("docker" "bash" "socat" "jq" "curl" "avahi-daemon" "dbus-daemon") | |
missing= | |
echo "Checking for all requirements..." | |
for cmd in ${requirements[@]}; do | |
package="$cmd" | |
[[ "$cmd" == "dbus-daemon" ]] && package="dbus" | |
[[ $(command -v "$cmd") ]] || missing="$missing$package " | |
done | |
if [[ -n "$missing" ]]; then | |
echo "Could not install requirements: $missing" | |
echo "Please install manually and run this script again." | |
exit 1 | |
else | |
echo "All requirements found!" | |
fi | |
echo "Installing Hass.io..." | |
curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s -- -m raspberrypi3 | |
echo | |
echo "Done." |
Thnx for the script. It worked super. But i have a little question. What user is running hassio once the script is installed?
greetings justin
systemctl start hassio-supervisor.service
can anyone help me?
getting this
Installing Hass.io...
bash: line 1: 404:: command not found
Done.
can anyone help me?
getting this
Installing Hass.io...
bash: line 1: 404:: command not foundDone.
the install script is deprecated.
needs to be replaced with this:
curl -sL https://raw.githubusercontent.com/home-assistant/hassio-installer/master/hassio_install.sh | bash -s -- -m raspberrypi3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey!
Tried the script and it installed fine, but the issue I get is that, after preparing the HASSio installation for 25 mins, it times out whenever I go to the IP address:8123. The Pi is on WiFi, and I have no access to an Ethernet plug. What can I try to fix that?