Install missing skin via composer on system initialization (#254)
authorBjalbor <redacted>
Mon, 9 Dec 2024 11:30:41 +0000 (12:30 +0100)
committerGitHub <redacted>
Mon, 9 Dec 2024 11:30:41 +0000 (12:30 +0100)
Co-authored-by: Björn Bores <redacted>
apache/docker-entrypoint.sh
fpm-alpine/docker-entrypoint.sh
fpm/docker-entrypoint.sh
templates/docker-entrypoint.sh
tests/docker-compose.test-apache-postgres.yml
tests/docker-compose.test-fpm-postgres.yml

index 64d96b2b6c6c387e48a9b3cb12bcecec35650f82..e493b51f3ca2d0f07dae80ec87e4f7c7c9a400da 100755 (executable)
@@ -102,6 +102,21 @@ if  [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
       ${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
   fi
 
+  if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then
+    # Installing missing skin
+    echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}"
+    composer \
+      --working-dir=${INSTALLDIR} \
+      --prefer-dist \
+      --prefer-stable \
+      --update-no-dev \
+      --no-interaction \
+      --optimize-autoloader \
+      require \
+      -- \
+      roundcube/${ROUNDCUBEMAIL_SKIN};
+  fi
+
   if [ ! -e config/config.inc.php ]; then
     GENERATED_DES_KEY=`head /dev/urandom | base64 | head -c 24`
     touch config/config.inc.php
index 64d96b2b6c6c387e48a9b3cb12bcecec35650f82..e493b51f3ca2d0f07dae80ec87e4f7c7c9a400da 100755 (executable)
@@ -102,6 +102,21 @@ if  [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
       ${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
   fi
 
+  if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then
+    # Installing missing skin
+    echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}"
+    composer \
+      --working-dir=${INSTALLDIR} \
+      --prefer-dist \
+      --prefer-stable \
+      --update-no-dev \
+      --no-interaction \
+      --optimize-autoloader \
+      require \
+      -- \
+      roundcube/${ROUNDCUBEMAIL_SKIN};
+  fi
+
   if [ ! -e config/config.inc.php ]; then
     GENERATED_DES_KEY=`head /dev/urandom | base64 | head -c 24`
     touch config/config.inc.php
index 64d96b2b6c6c387e48a9b3cb12bcecec35650f82..e493b51f3ca2d0f07dae80ec87e4f7c7c9a400da 100755 (executable)
@@ -102,6 +102,21 @@ if  [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
       ${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
   fi
 
+  if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then
+    # Installing missing skin
+    echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}"
+    composer \
+      --working-dir=${INSTALLDIR} \
+      --prefer-dist \
+      --prefer-stable \
+      --update-no-dev \
+      --no-interaction \
+      --optimize-autoloader \
+      require \
+      -- \
+      roundcube/${ROUNDCUBEMAIL_SKIN};
+  fi
+
   if [ ! -e config/config.inc.php ]; then
     GENERATED_DES_KEY=`head /dev/urandom | base64 | head -c 24`
     touch config/config.inc.php
index 64d96b2b6c6c387e48a9b3cb12bcecec35650f82..e493b51f3ca2d0f07dae80ec87e4f7c7c9a400da 100644 (file)
@@ -102,6 +102,21 @@ if  [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
       ${ROUNDCUBEMAIL_COMPOSER_PLUGINS_SH};
   fi
 
+  if [ ! -d skins/${ROUNDCUBEMAIL_SKIN} ]; then
+    # Installing missing skin
+    echo "Installing missing skin: ${ROUNDCUBEMAIL_SKIN}"
+    composer \
+      --working-dir=${INSTALLDIR} \
+      --prefer-dist \
+      --prefer-stable \
+      --update-no-dev \
+      --no-interaction \
+      --optimize-autoloader \
+      require \
+      -- \
+      roundcube/${ROUNDCUBEMAIL_SKIN};
+  fi
+
   if [ ! -e config/config.inc.php ]; then
     GENERATED_DES_KEY=`head /dev/urandom | base64 | head -c 24`
     touch config/config.inc.php
index 4612b25a0444a780b173a3993d943c481d0856fc..578d931ea74584b752fbcf09516dffc88acfa4f6 100644 (file)
@@ -23,6 +23,7 @@ services:
       - ROUNDCUBEMAIL_DB_NAME=roundcube # same as pgsql POSTGRES_DB env name
       - ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name
       - ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name
+      - ROUNDCUBEMAIL_SKIN=larry # Install non-default skin
 
   roundcubedb:
     image: postgres:alpine
index 1e616c4a2467adbde2d9dc0f8c0771c5ecb7a1f7..b2a8cf61db65dda9bbc12d42427b50b40de45836 100644 (file)
@@ -28,6 +28,7 @@ services:
       - ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name
       - ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name
       - ROUNDCUBEMAIL_PLUGINS=enigma
+      - ROUNDCUBEMAIL_SKIN=larry # Install non-default skin
 
   roundcubedb:
     image: postgres:alpine
git clone https://git.99rst.org/PROJECT