Update installer.sh
This is my first attempt at modifying a script, so please be nice. - Stops and disables ModemManager - Installs the required dependencies for HA - Docker-CE script added in User now only has to `sudo-i` and then run the script for everything to be up and running. I've tested as proposed 3 times on fresh VM installs, and all is working as expected.
This commit is contained in:
parent
c384c3bee2
commit
136b8e98ea
1 changed files with 47 additions and 0 deletions
47
installer.sh
47
installer.sh
|
@ -1,10 +1,57 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
systemctl status ModemManager | grep 'active (running)' > /dev/null 2>&1
|
||||
|
||||
if [ $? != 0 ]
|
||||
then
|
||||
systemctl disable ModemManager > /dev/null
|
||||
systemctl stop ModemManager > /dev/null
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
function info { echo -e "[Info] $*"; }
|
||||
function error { echo -e "[Error] $*"; exit 1; }
|
||||
function warn { echo -e "[Warning] $*"; }
|
||||
|
||||
# Install required dependencies
|
||||
test $? -eq 0 || exit 1 "you should have sudo priveledge to run this script"
|
||||
|
||||
info ""
|
||||
info ""
|
||||
info "Installing Home Assistant dependencies"
|
||||
info ""
|
||||
info ""
|
||||
|
||||
while read -r p ; do sudo apt-get install -y $p ; done < <(cat << "EOF"
|
||||
software-properties-common
|
||||
apparmor-utils
|
||||
apt-transport-https
|
||||
avahi-daemon
|
||||
ca-certificates
|
||||
curl
|
||||
dbus
|
||||
jq
|
||||
network-manager
|
||||
EOF
|
||||
)
|
||||
|
||||
# Install Docker-ce
|
||||
info ""
|
||||
info ""
|
||||
info "Installing Docker-ce"
|
||||
info ""
|
||||
info ""
|
||||
|
||||
curl -fsSL get.docker.com | sh
|
||||
|
||||
# Install Home Assistant Supervised
|
||||
info ""
|
||||
info ""
|
||||
info "Now installing Home Assistant Supervised"
|
||||
info ""
|
||||
info ""
|
||||
|
||||
warn ""
|
||||
warn "If you want more control over your own system, run"
|
||||
warn "Home Assistant as a VM or run Home Assistant Core"
|
||||
|
|
Loading…
Reference in a new issue