mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-11 01:55:59 +02:00
custom apps code
This commit is contained in:
@@ -117,6 +117,6 @@
|
|||||||
},
|
},
|
||||||
"slug": "webtop-kde",
|
"slug": "webtop-kde",
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||||
"version": "4.16-r0-ls89-test11",
|
"version": "4.16-r0-ls89-test12",
|
||||||
"video": true
|
"video": true
|
||||||
}
|
}
|
||||||
@@ -9,10 +9,15 @@ if bashio::config.has_value 'additional_apps'; then
|
|||||||
bashio::log.info "Installing additional apps :"
|
bashio::log.info "Installing additional apps :"
|
||||||
# hadolint ignore=SC2005
|
# hadolint ignore=SC2005
|
||||||
NEWAPPS=$(bashio::config 'additional_apps')
|
NEWAPPS=$(bashio::config 'additional_apps')
|
||||||
for APP in ${NEWAPPS//,/ }; do
|
for packagestoinstall in ${NEWAPPS//,/ }; do
|
||||||
bashio::log.green "... $APP"
|
bashio::log.green "... $APP"
|
||||||
# shellcheck disable=SC2015
|
if [ "$PACKMANAGER" = "apk" ]; then
|
||||||
apk add --no-cache "$APP" >/dev/null || bashio::log.red "... not successful, please check package name"
|
apk add --no-cache "$packagestoinstall" &>/dev/null || (bashio::log.fatal "Error : $packagestoinstall not found")
|
||||||
|
elif [ "$PACKMANAGER" = "apt" ]; then
|
||||||
|
apt-get install -yqq --no-install-recommends "$packagestoinstall" &>/dev/null || (bashio::log.fatal "Error : $packagestoinstall not found")
|
||||||
|
elif [ "$PACKMANAGER" = "pacman" ]; then
|
||||||
|
pacman --noconfirm -S "$packagestoinstall" &>/dev/null || (bashio::log.fatal "Error : $packagestoinstall not found")
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -20,8 +25,9 @@ fi
|
|||||||
if bashio::config.has_value 'TZ'; then
|
if bashio::config.has_value 'TZ'; then
|
||||||
TIMEZONE=$(bashio::config 'TZ')
|
TIMEZONE=$(bashio::config 'TZ')
|
||||||
bashio::log.info "Setting timezone to $TIMEZONE"
|
bashio::log.info "Setting timezone to $TIMEZONE"
|
||||||
ln -snf /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime && echo "$TIMEZONE" >/etc/timezone
|
ln -snf /usr/share/zoneinfo/"$TIMEZONE" /etc/localtime
|
||||||
fi
|
echo "$TIMEZONE" >/etc/timezone
|
||||||
|
fi || true
|
||||||
|
|
||||||
# Set keyboard
|
# Set keyboard
|
||||||
if bashio::config.has_value 'KEYBOARD'; then
|
if bashio::config.has_value 'KEYBOARD'; then
|
||||||
@@ -30,7 +36,7 @@ if bashio::config.has_value 'KEYBOARD'; then
|
|||||||
sed -i "1a export KEYBOARD=$KEYBOARD" /etc/s6-overlay/s6-rc.d/svc-web/run
|
sed -i "1a export KEYBOARD=$KEYBOARD" /etc/s6-overlay/s6-rc.d/svc-web/run
|
||||||
if [ -d /var/run/s6/container_environment ]; then printf "%s" "$KEYBOARD" > /var/run/s6/container_environment/KEYBOARD; fi
|
if [ -d /var/run/s6/container_environment ]; then printf "%s" "$KEYBOARD" > /var/run/s6/container_environment/KEYBOARD; fi
|
||||||
printf "%s" "KEYBOARD=\"$KEYBOARD\"" >> ~/.bashrc
|
printf "%s" "KEYBOARD=\"$KEYBOARD\"" >> ~/.bashrc
|
||||||
fi
|
fi || true
|
||||||
|
|
||||||
# Set password
|
# Set password
|
||||||
if bashio::config.has_value 'PASSWORD'; then
|
if bashio::config.has_value 'PASSWORD'; then
|
||||||
@@ -38,4 +44,4 @@ if bashio::config.has_value 'PASSWORD'; then
|
|||||||
PASSWORD=$(bashio::config 'PASSWORD')
|
PASSWORD=$(bashio::config 'PASSWORD')
|
||||||
passwd -d abc
|
passwd -d abc
|
||||||
echo -e "$PASSWORD\n$PASSWORD" | passwd abc
|
echo -e "$PASSWORD\n$PASSWORD" | passwd abc
|
||||||
fi
|
fi || true
|
||||||
|
|||||||
Reference in New Issue
Block a user