From 78e2b0fd11da066bc086289cfd6a1803379573c5 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Sun, 2 Apr 2023 11:38:50 +0200 Subject: [PATCH] Correct PUID PGID --- .templates/00-banner.sh | 2 ++ nextcloud/rootfs/etc/cont-init.d/01-folders.sh | 2 ++ nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh | 1 - nextcloud/rootfs/etc/cont-init.d/98-upgrade.sh | 3 --- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.templates/00-banner.sh b/.templates/00-banner.sh index 5516f53b8..b003b45e1 100755 --- a/.templates/00-banner.sh +++ b/.templates/00-banner.sh @@ -43,6 +43,8 @@ fi # ============================================================================== if bashio::config.has_value "PUID" && bashio::config.has_value "PGID"; then bashio::log.green "Defining permissions for main user :" + PUID="$(bashio::config "PUID")" + PGID="$(bashio::config "PGID")" bashio::log.blue "User UID: $PUID" bashio::log.blue "User GID : $PGID" groupmod -o -g "$PGID" abc diff --git a/nextcloud/rootfs/etc/cont-init.d/01-folders.sh b/nextcloud/rootfs/etc/cont-init.d/01-folders.sh index 61994f267..4a6a3da77 100755 --- a/nextcloud/rootfs/etc/cont-init.d/01-folders.sh +++ b/nextcloud/rootfs/etc/cont-init.d/01-folders.sh @@ -3,6 +3,8 @@ if bashio::config.has_value "PUID" && bashio::config.has_value "PGID"; then bashio::log.green "Setting user to $PUID:$PGID" + PUID="$(bashio::config "PUID")" + PGID="$(bashio::config "PGID")" groupmod -o -g "$PGID" abc usermod -o -u "$PUID" abc fi 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 bcf90a8ef..0adf8dbe4 100755 --- a/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh +++ b/nextcloud/rootfs/etc/cont-init.d/02-init_steps.sh @@ -34,7 +34,6 @@ if [ -f /notinstalled ]; then fi # Specify launcher -PUID=$(bashio::config "PUID") LAUNCHER="sudo -u abc php /data/config/www/nextcloud/occ" # Inform if new version available diff --git a/nextcloud/rootfs/etc/cont-init.d/98-upgrade.sh b/nextcloud/rootfs/etc/cont-init.d/98-upgrade.sh index 43e3f040b..aa0df03aa 100755 --- a/nextcloud/rootfs/etc/cont-init.d/98-upgrade.sh +++ b/nextcloud/rootfs/etc/cont-init.d/98-upgrade.sh @@ -4,9 +4,6 @@ # Only execute if installed if [ -f /notinstalled ]; then exit 0; fi -# Specify launcher -PUID=$(bashio::config "PUID") - # Check current version if [ -f /data/config/www/nextcloud/version.php ]; then CURRENTVERSION="$(sed -n "s|.*\OC_VersionString = '*\(.*[^ ]\) *';.*|\1|p" /data/config/www/nextcloud/version.php)"