Update Installer.sh
Added Homer (Dashboard) as an installer option. Added dependencies for Homer: nginx, unzip. Opening ports in UFW if Homer is selected. To do: Make basic config for Homer and the installer options / services that are selected. Test this new configuration.
This commit is contained in:
parent
0dd25a65db
commit
fb64936a88
19
Installer.sh
19
Installer.sh
@ -111,12 +111,13 @@ fi
|
|||||||
|
|
||||||
if [[ $SKIPinfo != "yes" ]]; then
|
if [[ $SKIPinfo != "yes" ]]; then
|
||||||
OPTIONS=$(whiptail --title "Configure Options" --checklist \
|
OPTIONS=$(whiptail --title "Configure Options" --checklist \
|
||||||
"What to install?" 12 113 6 \
|
"What to install?" 12 113 7 \
|
||||||
"Domoticz" "Is a Home Automation System." ON \
|
"Domoticz" "Is a Home Automation System." ON \
|
||||||
"Node-RED" "Is a programming tool wiring hardware devices together." OFF \
|
"Node-RED" "Is a programming tool wiring hardware devices together." OFF \
|
||||||
"Zigbee2MQTT" "Supports various Zigbee adapters and a big bunch of devices." OFF \
|
"Zigbee2MQTT" "Supports various Zigbee adapters and a big bunch of devices." OFF \
|
||||||
"MQTT-Broker" "Is a intermediary entity that enables MQTT clients to communicate." ON \
|
"MQTT-Broker" "Is a intermediary entity that enables MQTT clients to communicate." ON \
|
||||||
"Unattended-Upgrades" "Is a system package that automaticly downloads security updates." ON \
|
"Unattended-Upgrades" "Is a system package that automaticly downloads security updates." ON \
|
||||||
|
"Homer" "Is a dashboard with Google and quick links to your installed services." OFF \
|
||||||
"Monitor-Service" "Autologin the Pi user to show system and service statuses. (usefull with TFT)" OFF 3>&1 1>&2 2>&3)
|
"Monitor-Service" "Autologin the Pi user to show system and service statuses. (usefull with TFT)" OFF 3>&1 1>&2 2>&3)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -204,6 +205,9 @@ fi
|
|||||||
if [[ $OPTIONS == *"Unattended-Upgrades"* ]]; then
|
if [[ $OPTIONS == *"Unattended-Upgrades"* ]]; then
|
||||||
echo "unattended-upgrades apt-listchanges" >> /tmp/install.list
|
echo "unattended-upgrades apt-listchanges" >> /tmp/install.list
|
||||||
fi
|
fi
|
||||||
|
if [[ $OPTIONS == *"Homer"* ]]; then
|
||||||
|
echo "nginx unzip" >> /tmp/install.list
|
||||||
|
fi
|
||||||
|
|
||||||
##-----------##
|
##-----------##
|
||||||
# Updater #
|
# Updater #
|
||||||
@ -263,7 +267,14 @@ if [[ $OPTIONS == *"Domoticz"* ]]; then
|
|||||||
update-rc.d domoticz.sh defaults
|
update-rc.d domoticz.sh defaults
|
||||||
systemctl start domoticz
|
systemctl start domoticz
|
||||||
fi
|
fi
|
||||||
|
if [[ $OPTIONS == *"Homer"* ]]; then
|
||||||
|
rm /etc/nginx/sites/enabled/default
|
||||||
|
wget $GIT/$REPO/$BRANCH/Homer/site.conf -O /etc/nginx/sites-enabled/dashboard
|
||||||
|
wget $GIT/$REPO/$BRANCH/Homer/dashboard.zip -O /tmp/dashboard.zip
|
||||||
|
mkdir -p /var/www/html
|
||||||
|
unzip /tmp/dashboard.zip -d /var/www/html/
|
||||||
|
systemctl enable --now nginx
|
||||||
|
fi
|
||||||
|
|
||||||
##---------------##
|
##---------------##
|
||||||
# Configuring #
|
# Configuring #
|
||||||
@ -297,6 +308,10 @@ if [[ $OPTIONS == *"Node-RED"* ]]; then
|
|||||||
ufw allow 1880/tcp
|
ufw allow 1880/tcp
|
||||||
ufw allow 1880/udp
|
ufw allow 1880/udp
|
||||||
fi
|
fi
|
||||||
|
if [[ $OPTIONS == *"Homer"* ]]; then
|
||||||
|
ufw allow 80/tcp
|
||||||
|
ufw allow 80/udp
|
||||||
|
fi
|
||||||
|
|
||||||
ufw limit 22/tcp
|
ufw limit 22/tcp
|
||||||
echo "y" | ufw enable
|
echo "y" | ufw enable
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user