mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-18 05:19:11 +02:00
hadolint
This commit is contained in:
@@ -134,23 +134,23 @@ done
|
|||||||
|
|
||||||
# Install apps
|
# Install apps
|
||||||
[ "$VERBOSE" = true ] && echo "installing packages $PACKAGES"
|
[ "$VERBOSE" = true ] && echo "installing packages $PACKAGES"
|
||||||
[ "$PACKMANAGER" = "apt" ] && apt-get update >/dev/null || true
|
if [ "$PACKMANAGER" = "apt" ]; then apt-get update >/dev/null; fi
|
||||||
|
|
||||||
# Install apps one by one to allow failures
|
# Install apps one by one to allow failures
|
||||||
ERROR=0
|
ERROR=0
|
||||||
for packagestoinstall in $PACKAGES; do
|
for packagestoinstall in $PACKAGES; do
|
||||||
[ "$VERBOSE" = true ] && echo "... $packagestoinstall"
|
[ "$VERBOSE" = true ] && echo "... $packagestoinstall"
|
||||||
if [ "$PACKMANAGER" = "apk" ]; then
|
if [ "$PACKMANAGER" = "apk" ]; then
|
||||||
apk add --no-cache $packagestoinstall &>/dev/null || (echo "Error : $packagestoinstall not found" && ERROR=1)
|
apk add --no-cache "$packagestoinstall" &>/dev/null || (echo "Error : $packagestoinstall not found" && touch /ERROR)
|
||||||
elif [ "$PACKMANAGER" = "apt" ]; then
|
elif [ "$PACKMANAGER" = "apt" ]; then
|
||||||
apt-get install -yqq --no-install-recommends $packagestoinstall &>/dev/null || (echo "Error : $packagestoinstall not found" && ERROR=1)
|
apt-get install -yqq --no-install-recommends "$packagestoinstall" &>/dev/null || (echo "Error : $packagestoinstall not found" && touch /ERROR)
|
||||||
fi
|
fi
|
||||||
[ "$VERBOSE" = true ] && echo "... $packagestoinstall done"
|
[ "$VERBOSE" = true ] && echo "... $packagestoinstall done"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Clean after install
|
# Clean after install
|
||||||
[ "$VERBOSE" = true ] && echo "Cleaning apt cache"
|
[ "$VERBOSE" = true ] && echo "Cleaning apt cache"
|
||||||
[ "$PACKMANAGER" = "apt" ] && apt-get clean >/dev/null || true
|
if [ "$PACKMANAGER" = "apt" ]; then apt-get clean >/dev/null; fi
|
||||||
|
|
||||||
# Replace nginx if installed
|
# Replace nginx if installed
|
||||||
if ls /etc/nginx2 1>/dev/null 2>&1; then
|
if ls /etc/nginx2 1>/dev/null 2>&1; then
|
||||||
@@ -213,6 +213,6 @@ for files in "/scripts" "/etc/services.d" "/etc/cont-init.d"; do
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $ERROR = 1 ]; then
|
if [ -f /ERROR ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user