Browse Source

nextcloud: fix parameter expansion in occ script (#2702)

Stavros Kois 1 year ago
parent
commit
aa50afd42b

+ 1 - 1
library/ix-dev/charts/nextcloud/Chart.yaml

@@ -4,7 +4,7 @@ description: A file sharing server that puts the control and security of your ow
 annotations:
 annotations:
   title: Nextcloud
   title: Nextcloud
 type: application
 type: application
-version: 2.0.11
+version: 2.0.12
 apiVersion: v2
 apiVersion: v2
 appVersion: 29.0.4
 appVersion: 29.0.4
 kubeVersion: '>=1.16.0-0'
 kubeVersion: '>=1.16.0-0'

+ 2 - 2
library/ix-dev/charts/nextcloud/templates/_nextcloud-configs.tpl

@@ -26,9 +26,9 @@ configmap:
         fi
         fi
         run_as() {
         run_as() {
           if [ "$(id -u)" = 0 ]; then
           if [ "$(id -u)" = 0 ]; then
-            su -p "$user" -s /bin/bash -c 'php /var/www/html/occ "$@"' - "$@"
+            su -p "$user" -s /bin/bash -c "php /var/www/html/occ $(printf '%q ' "$@")"
           else
           else
-            /bin/bash -c 'php /var/www/html/occ "$@"' - "$@"
+            /bin/bash -c "php /var/www/html/occ $(printf '%q ' "$@")"
           fi
           fi
         }
         }
         run_as "$@"
         run_as "$@"