Skip to content

Commit

Permalink
Added warning to Hass.io installer letting users know to read the doc…
Browse files Browse the repository at this point in the history
…umentation
  • Loading branch information
Slyke committed Oct 6, 2020
1 parent a3e3c24 commit 2bd9114
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 11 deletions.
38 changes: 30 additions & 8 deletions .native/hassio_supervisor.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
echo "install requirements for hass.io"
#!/bin/bash

echo " "
echo "Ensure that you have read the documentation on installing Hass.io before continuing."
echo "Not following the installation instructions may render you system to be unable to connect to the internet."
echo "Hass.io Documentation: "
echo " https://sensorsiot.github.io/IOTstack/Containers/Home-Assistant/"

echo " "
sleep 1

read -r -n 1 -p "Press Y to continue, any other key to cancel " response;

if [[ $response == "y" || $response == "Y" ]]; then
echo "Install requirements for Hass.io"
sudo apt install -y bash jq curl avahi-daemon dbus
hassio_machine=$(whiptail --title "Machine type" --menu \
"Please select you device type" 20 78 12 -- \
Expand All @@ -18,12 +32,20 @@ echo "install requirements for hass.io"
"tinker" " " \
3>&1 1>&2 2>&3)

if [ -n "$hassio_machine" ]; then
sudo systemctl disable ModemManager
sudo systemctl stop ModemManager

curl -sL "https://raw.githubusercontent.com/Kanga-Who/home-assistant/master/supervised-installer.sh" | sudo bash -s -- -m $hassio_machine
if [ -n "$hassio_machine" ]; then
sudo systemctl disable ModemManager
sudo systemctl stop ModemManager
curl -sL "https://raw.githubusercontent.com/Kanga-Who/home-assistant/master/supervised-installer.sh" | sudo bash -s -- -m $hassio_machine
clear
exit 0
else
clear
echo "No selection"
exit 4
fi
clear
exit 3
else
echo "No selection"
exit
clear
exit 5
fi
13 changes: 10 additions & 3 deletions scripts/native_installs.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@ def onResize(sig, action):
def installHassIo():
print("Install Home Assistant Supervisor")
print("./.native/hassio_supervisor.sh")
subprocess.call("./.native/hassio_supervisor.sh", shell=True)
res = subprocess.call("./.native/hassio_supervisor.sh", shell=True)
print("")
print("Preinstallation complete. Your system may run slow for a few hours as Hass.io installs its services.")
print("Press [Up] or [Down] arrow key to show the menu if it has scrolled too far.")
if res == 0:
print("Preinstallation complete. Your system may run slow for a few hours as Hass.io installs its services.")
print("Press [Up] or [Down] arrow key to show the menu if it has scrolled too far.")
else:
print("Preinstallation not completed.")
print("Press [Up] or [Down] arrow key to show the menu if it has scrolled too far.")
time.sleep(0.5)
mainRender(2, mainMenuList, currentMenuItemIndex)
return True

def installRtl433():
Expand All @@ -46,6 +51,7 @@ def installRtl433():
print("")
print("Installation complete. Press [Up] or [Down] arrow key to show the menu if it has scrolled too far.")
time.sleep(0.5)
mainRender(2, mainMenuList, currentMenuItemIndex)
return True

def installRpiEasy():
Expand All @@ -55,6 +61,7 @@ def installRpiEasy():
print("")
print("Installation complete. Press [Up] or [Down] arrow key to show the menu if it has scrolled too far.")
time.sleep(0.5)
mainRender(2, mainMenuList, currentMenuItemIndex)
return True

def goBack():
Expand Down

0 comments on commit 2bd9114

Please sign in to comment.