From f03c48cc7c770e17a1de7b6d4c2f67a27beeff77 Mon Sep 17 00:00:00 2001 From: Florent VINCENT Date: Tue, 20 Jul 2021 11:36:28 +0000 Subject: [PATCH 1/3] Update custom_entrypoint.sh to force theme (re)activation in case of nc upgrade --- custom_entrypoint.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 0aead910..5d2aa90c 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -19,4 +19,9 @@ rsync $rsync_options --include "/ecloud_drop_account" --exclude '/*' $SRC_DIR/cu rsync $rsync_options --include "/eelo/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR/themes/ /entrypoint.sh "$@" + +# force eelo theme to be loaded +su -p www-data -s /bin/sh -c "php /var/www/html/occ config:system:set theme --value eelo" +su -p www-data -s /bin/sh -c "php /var/www/html/occ maintenance:theme:update" + echo "NC exits" -- GitLab From 7e4811a247f77d54b8877c866bfa0c57b722d850 Mon Sep 17 00:00:00 2001 From: Florent VINCENT Date: Tue, 20 Jul 2021 11:46:35 +0000 Subject: [PATCH 2/3] Update custom_entrypoint.sh to test which user launch commands in this file --- custom_entrypoint.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 5d2aa90c..18312921 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -21,7 +21,14 @@ rsync $rsync_options --include "/eelo/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR /entrypoint.sh "$@" # force eelo theme to be loaded -su -p www-data -s /bin/sh -c "php /var/www/html/occ config:system:set theme --value eelo" -su -p www-data -s /bin/sh -c "php /var/www/html/occ maintenance:theme:update" + whoami + if [ "$(id -u)" = 0 ]; then + su -p www-data -s /bin/sh -c "php /var/www/html/occ config:system:set theme --value eelo" + su -p www-data -s /bin/sh -c "php /var/www/html/occ maintenance:theme:update" + else + sh -c "php /var/www/html/occ config:system:set theme --value eelo" + sh -c "php /var/www/html/occ maintenance:theme:update" + fi -echo "NC exits" + +echo "NC ready!" -- GitLab From 9b670060d23c7d1f2dcfbad18b064ffbb90b474e Mon Sep 17 00:00:00 2001 From: Florent VINCENT Date: Tue, 20 Jul 2021 12:27:23 +0000 Subject: [PATCH 3/3] Update custom_entrypoint.sh for comment --- custom_entrypoint.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/custom_entrypoint.sh b/custom_entrypoint.sh index 18312921..99c5c935 100644 --- a/custom_entrypoint.sh +++ b/custom_entrypoint.sh @@ -20,8 +20,7 @@ rsync $rsync_options --include "/eelo/" --exclude '/*' $SRC_DIR/themes/ $DST_DIR /entrypoint.sh "$@" -# force eelo theme to be loaded - whoami +# force eelo theme to be (re)loaded after an upgrade if [ "$(id -u)" = 0 ]; then su -p www-data -s /bin/sh -c "php /var/www/html/occ config:system:set theme --value eelo" su -p www-data -s /bin/sh -c "php /var/www/html/occ maintenance:theme:update" -- GitLab