From dd93c165664d056786626456ffebba8594c31db8 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 24 Sep 2023 06:50:11 +0200 Subject: [PATCH] Correct script identification https://github.com/alexbelgium/hassio-addons/issues/1004 --- .templates/91-universal_graphic_drivers.sh | 2 +- nextcloud/config.json | 2 +- nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh | 2 +- nextcloud/rootfs/etc/cont-init.d/02-mariadb_discovery.sh | 2 +- nextcloud/rootfs/etc/cont-init.d/99-add_packages.sh | 2 +- nextcloud/rootfs/etc/cont-init.d/99-elasticsearch.sh | 2 +- nextcloud/rootfs/etc/cont-init.d/99-ocr.sh | 2 +- nextcloud/rootfs/etc/cont-init.d/99-trusted_domains.sh | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.templates/91-universal_graphic_drivers.sh b/.templates/91-universal_graphic_drivers.sh index 083f2dad13e..5edf61136b7 100755 --- a/.templates/91-universal_graphic_drivers.sh +++ b/.templates/91-universal_graphic_drivers.sh @@ -5,7 +5,7 @@ if bashio::config.has_value "graphic_driver"; then # Origin : https://github.com/wumingjieno1/photoprism-test/blob/main/scripts/dist/install-gpu.sh # abort if not executed as root if [[ $(id -u) != "0" ]]; then - bashio::log.fatal "Error: Run ${0##*/} as root" 1>&2 + bashio::log.fatal "Error: Run $(basename "${BASH_SOURCE}") as root" 1>&2 exit 1 fi diff --git a/nextcloud/config.json b/nextcloud/config.json index c4aae4a26f3..cee2fa0935d 100644 --- a/nextcloud/config.json +++ b/nextcloud/config.json @@ -125,6 +125,6 @@ "slug": "nextcloud_ocr", "uart": true, "url": "https://github.com/alexbelgium/hassio-addons/tree/master/nextcloud", - "version": "27.1.1", + "version": "27.1.1-2", "webui": "https://[HOST]:[PORT:443]" } diff --git a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh index bf7c90fcd6c..8b7ddaa08ef 100755 --- a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh +++ b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh @@ -2,7 +2,7 @@ # shellcheck shell=bash # Runs only after initialization done -if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"${0##*/}" /scripts/ && exit 0; fi +if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi ###################################### # Make links between logs and docker # diff --git a/nextcloud/rootfs/etc/cont-init.d/02-mariadb_discovery.sh b/nextcloud/rootfs/etc/cont-init.d/02-mariadb_discovery.sh index bd4df489f7f..653da972105 100755 --- a/nextcloud/rootfs/etc/cont-init.d/02-mariadb_discovery.sh +++ b/nextcloud/rootfs/etc/cont-init.d/02-mariadb_discovery.sh @@ -2,7 +2,7 @@ # shellcheck shell=bash # Runs only after initialization done -if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"${0##*/}" /scripts/ && exit 0; fi +if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi if bashio::services.available 'mysql'; then diff --git a/nextcloud/rootfs/etc/cont-init.d/99-add_packages.sh b/nextcloud/rootfs/etc/cont-init.d/99-add_packages.sh index bbf13191b51..9de1c89ecc2 100755 --- a/nextcloud/rootfs/etc/cont-init.d/99-add_packages.sh +++ b/nextcloud/rootfs/etc/cont-init.d/99-add_packages.sh @@ -2,7 +2,7 @@ # shellcheck shell=bash # Runs only after initialization done -if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"${0##*/}" /scripts/ && exit 0; fi +if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi # Install specific packages if [ ! -d /data/config/www/nextcloud/apps/pdfannotate ]; then diff --git a/nextcloud/rootfs/etc/cont-init.d/99-elasticsearch.sh b/nextcloud/rootfs/etc/cont-init.d/99-elasticsearch.sh index df97a6adbec..e2dc95792b3 100755 --- a/nextcloud/rootfs/etc/cont-init.d/99-elasticsearch.sh +++ b/nextcloud/rootfs/etc/cont-init.d/99-elasticsearch.sh @@ -3,7 +3,7 @@ # shellcheck disable=SC2086 # Runs only after initialization done -if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"${0##*/}" /scripts/ && exit 0; fi +if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi # Only execute if installed if [ -f /notinstalled ]; then exit 0; fi diff --git a/nextcloud/rootfs/etc/cont-init.d/99-ocr.sh b/nextcloud/rootfs/etc/cont-init.d/99-ocr.sh index cf3d820c0e8..7495c5051ee 100755 --- a/nextcloud/rootfs/etc/cont-init.d/99-ocr.sh +++ b/nextcloud/rootfs/etc/cont-init.d/99-ocr.sh @@ -2,7 +2,7 @@ # shellcheck shell=bash # Runs only after initialization done -if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"${0##*/}" /scripts/ && exit 0; fi +if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi # Only execute if installed if [ -f /notinstalled ]; then exit 0; fi diff --git a/nextcloud/rootfs/etc/cont-init.d/99-trusted_domains.sh b/nextcloud/rootfs/etc/cont-init.d/99-trusted_domains.sh index 1f4e11f62b1..2b9eef6a317 100755 --- a/nextcloud/rootfs/etc/cont-init.d/99-trusted_domains.sh +++ b/nextcloud/rootfs/etc/cont-init.d/99-trusted_domains.sh @@ -2,7 +2,7 @@ # shellcheck shell=bash # Runs only after initialization done -if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"${0##*/}" /scripts/ && exit 0; fi +if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi # Only execute if installed if [ -f /notinstalled ]; then exit 0; fi