Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
2586e8bf
Commit
2586e8bf
authored
Mar 08, 2019
by
Igor Pecovnik
Browse files
Add Home assistant / Hass.io Docker based install
parent
541a21b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
debian-software
View file @
2586e8bf
...
@@ -31,6 +31,7 @@
...
@@ -31,6 +31,7 @@
# install_Virus
# install_Virus
# install_hhvm
# install_hhvm
# install_openhab
# install_openhab
# install_hass.io
# install_phpmyadmin
# install_phpmyadmin
# install_apache
# install_apache
# install_nginx
# install_nginx
...
@@ -92,7 +93,7 @@ function check_status
...
@@ -92,7 +93,7 @@ function check_status
dialog
--
backtitle
"
$BACKTITLE
"
--
title
"Please wait"
--
infobox
"
\n
Loading install info ... "
5
28
dialog
--
backtitle
"
$BACKTITLE
"
--
title
"Please wait"
--
infobox
"
\n
Loading install info ... "
5
28
LIST
=
()
LIST
=
()
LIST_CONST
=
2
5
LIST_CONST
=
2
6
# Samba
# Samba
SAMBA_STATUS
=
"$(check_if_installed samba && echo "
on
" || echo "
off
" )"
SAMBA_STATUS
=
"$(check_if_installed samba && echo "
on
" || echo "
off
" )"
...
@@ -114,9 +115,14 @@ function check_status
...
@@ -114,9 +115,14 @@ function check_status
alive_port
"Personal cloud @syncthing.net"
"8384"
"boolean"
alive_port
"Personal cloud @syncthing.net"
"8384"
"boolean"
LIST
+=
(
"Syncthing"
"
$DESCRIPTION
"
"
$SYNCTHING_STATUS
"
)
LIST
+=
(
"Syncthing"
"
$DESCRIPTION
"
"
$SYNCTHING_STATUS
"
)
# Hass.io
HASS_STATUS
=
"$([[ -f /etc/hassio.json ]] && echo "
on
" || echo "
off
" )"
alive_port
"Home assistant smarthome suite"
"8123"
LIST
+=
(
"Hassio"
"
$DESCRIPTION
"
"
$HASS_STATUS
"
)
# OpenHab
# OpenHab
OPENHAB_STATUS
=
"$([[ -f /usr/bin/openhab-cli ]] && echo "
on
" || echo "
off
" )"
OPENHAB_STATUS
=
"$([[ -f /usr/bin/openhab-cli ]] && echo "
on
" || echo "
off
" )"
alive_port
"
S
marthome suite"
"8080"
alive_port
"
Openhab2 s
marthome suite"
"8080"
LIST
+=
(
"OpenHAB"
"
$DESCRIPTION
"
"
$OPENHAB_STATUS
"
)
LIST
+=
(
"OpenHAB"
"
$DESCRIPTION
"
"
$OPENHAB_STATUS
"
)
# VPN
# VPN
...
@@ -823,8 +829,29 @@ chmod +x /etc/cron.daily/seed-armbian-torrent
...
@@ -823,8 +829,29 @@ chmod +x /etc/cron.daily/seed-armbian-torrent
install_hassio
()
{
#
#
Install
Home
assitant
smart
home
suite
hass.io
#
install_docker
debconf-apt-progress
--
apt-get
install
-y
apparmor-utils
apt-transport-https
avahi-daemon
ca-certificates
curl
dbus
jq
network-manager
socat
software-properties-common
local
arch=
$(dpkg
--print-architecture
)
[[
"$
arch
"
==
"
arm64
"
]]
&&
arch=
"aarch64"
docker
pull
homeassistant
/${
arch
}
-homeassistant
curl
-sL
"
https:
//
raw.githubusercontent.com
/
home-assistant
/
hassio-build
/
master
/
install
/
hassio_install
"
>
${TEMP_DIR}/hass.io.bash
bash ${TEMP_DIR}/hass.io.bash -m ${arch}
}
install_openhab ()
install_openhab ()
{
{
#
# Install Openhab2 smart home suite openhab.org
#
wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | apt-key add - >/dev/null 2>
&
1
wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | apt-key add - >/dev/null 2>
&
1
echo 'deb https://dl.bintray.com/openhab/apt-repo2 stable main' | tee /etc/apt/sources.list.d/openhab2.list >/dev/null 2>
&
1
echo 'deb https://dl.bintray.com/openhab/apt-repo2 stable main' | tee /etc/apt/sources.list.d/openhab2.list >/dev/null 2>
&
1
debconf-apt-progress -- apt-get update
debconf-apt-progress -- apt-get update
...
@@ -1643,6 +1670,11 @@ if ! is_package_manager_running; then
...
@@ -1643,6 +1670,11 @@ if ! is_package_manager_running; then
selection=${selection//Syncthing/}
selection=${selection//Syncthing/}
fi
fi
if [[ "$selection" == *Hassio*
&&
"$HASS_STATUS" != "on" ]]; then
install_hassio
selection=${selection//Hassio/}
fi
if [[ "$selection" == *OpenHAB*
&&
"$OPENHAB_STATUS" != "on" ]]; then
if [[ "$selection" == *OpenHAB*
&&
"$OPENHAB_STATUS" != "on" ]]; then
install_openhab
install_openhab
selection=${selection//OpenHAB/}
selection=${selection//OpenHAB/}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment