Enable roundcube shell scripts to be directly executed (#238)
authorLukas Müller <redacted>
Tue, 21 May 2024 20:54:57 +0000 (22:54 +0200)
committerGitHub <redacted>
Tue, 21 May 2024 20:54:57 +0000 (22:54 +0200)
* Updated conditional in all variants of the docker-entrypoint.sh script to allow for shell scripts to be executed easily

* Added example

apache/docker-entrypoint.sh
examples/kubernetes.yaml
fpm-alpine/docker-entrypoint.sh
fpm/docker-entrypoint.sh
nightly/docker-entrypoint.sh
templates/docker-entrypoint.sh

index 4ea2ff21f9f403dd39338352b8abaecd295f287a..5aaba562a477f0887a866b95786e3fc5bb1c5397 100755 (executable)
@@ -3,7 +3,7 @@
 
 # PWD=`pwd`
 
-if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
+if  [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
   # docroot is empty
   if ! [ -e index.php -a -e bin/installto.sh ]; then
     echo >&2 "roundcubemail not found in $PWD - copying now..."
index ac7310838962cfde1fe0958c802046238021b4a1..557c84bea2fabce5c755234f98d7bbed7d6559c6 100644 (file)
@@ -145,7 +145,7 @@ spec:
       - name: roundcubemail
         image: roundcube/roundcubemail:latest-fpm-alpine
         imagePullPolicy: ""
-        env:
+        env: &env
         - name: ROUNDCUBEMAIL_DB_TYPE
           value: pgsql
         - name: ROUNDCUBEMAIL_DB_HOST
@@ -278,3 +278,25 @@ spec:
     targetPort: 80
   selector:
     service: roundcubenginx
+---
+apiVersion: batch/v1
+kind: CronJob
+metadata:
+  name: cleandb
+spec:
+  schedule: "@daily"
+  concurrencyPolicy: Replace
+  jobTemplate:
+    spec:
+      template:
+        metadata:
+          name:  cleandb
+        spec:
+          restartPolicy: OnFailure
+          containers:
+            - name: roundcubemail
+              image: roundcube/roundcubemail:latest-fpm-alpine
+              imagePullPolicy: ""
+              env: *env
+              args:
+                - bin/cleandb.sh
index 4ea2ff21f9f403dd39338352b8abaecd295f287a..5aaba562a477f0887a866b95786e3fc5bb1c5397 100755 (executable)
@@ -3,7 +3,7 @@
 
 # PWD=`pwd`
 
-if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
+if  [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
   # docroot is empty
   if ! [ -e index.php -a -e bin/installto.sh ]; then
     echo >&2 "roundcubemail not found in $PWD - copying now..."
index 4ea2ff21f9f403dd39338352b8abaecd295f287a..5aaba562a477f0887a866b95786e3fc5bb1c5397 100755 (executable)
@@ -3,7 +3,7 @@
 
 # PWD=`pwd`
 
-if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
+if  [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
   # docroot is empty
   if ! [ -e index.php -a -e bin/installto.sh ]; then
     echo >&2 "roundcubemail not found in $PWD - copying now..."
index b76d8f0023ee0db3d1e768bd4312d65a5fdbd090..f83a9337833b6aa91f08ac97c7d31390e0afa88a 100755 (executable)
@@ -3,7 +3,7 @@
 
 # PWD=`pwd`
 
-if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
+if  [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
   # docroot is empty
   if ! [ -e index.php -a -e bin/installto.sh ]; then
     echo >&2 "roundcubemail not found in $PWD - copying now..."
index 4ea2ff21f9f403dd39338352b8abaecd295f287a..5aaba562a477f0887a866b95786e3fc5bb1c5397 100644 (file)
@@ -3,7 +3,7 @@
 
 # PWD=`pwd`
 
-if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
+if  [[ "$1" == apache2* || "$1" == php-fpm || "$1" == bin* ]]; then
   # docroot is empty
   if ! [ -e index.php -a -e bin/installto.sh ]; then
     echo >&2 "roundcubemail not found in $PWD - copying now..."
git clone https://git.99rst.org/PROJECT