mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-10 09:35:58 +02:00
ha_autoapps script
This commit is contained in:
26
.templates/ha_autoapps.sh
Normal file
26
.templates/ha_autoapps.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh
|
||||
# shellcheck disable=SC2015
|
||||
|
||||
##############################
|
||||
# Automatic apps download #
|
||||
##############################
|
||||
|
||||
PACKAGES="$1"
|
||||
|
||||
# Install bash if needed
|
||||
if ! command -v bash >/dev/null 2>/dev/null; then
|
||||
(apt-get update && apt-get install -yqq --no-install-recommends bash || apk add --no-cache bash) >/dev/null
|
||||
fi
|
||||
|
||||
# Install curl if needed
|
||||
if ! command -v curl >/dev/null 2>/dev/null; then
|
||||
(apt-get update && apt-get install -yqq --no-install-recommends curl || apk add --no-cache curl) >/dev/null
|
||||
fi
|
||||
|
||||
# Call apps installer script if needed
|
||||
curl -f -L -s -S "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/automatic_packages.sh" --output /automatic_packages.sh
|
||||
chmod 777 /automatic_packages.sh
|
||||
eval /./automatic_packages.sh "${PACKAGES:-}"
|
||||
|
||||
# Clean
|
||||
rm /automatic_packages.sh
|
||||
Reference in New Issue
Block a user