k8s-manifests/customers/base/script-configmap.yml

20 lines
1.2 KiB
YAML

apiVersion: v1
kind: ConfigMap
metadata:
name: script-configmap
data:
nc-upgrade: |
#!/bin/bash
sed "s/config_is_read_only\(.\) => true,/config_is_read_only\1 => false,/" /var/www/html/config/config.php > /var/www/html/config/config.php.tmp
mv /var/www/html/config/config.php.tmp /var/www/html/config/config.php
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ app:disable globalsiteselector
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ upgrade
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ app:enable globalsiteselector
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ maintenance:repair
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ maintenance:mode --off
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ db:add-missing-primary-keys
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ db:add-missing-columns
php -d apc.enable_cli=1 -d memory_limit=-1 /var/www/html/occ db:add-missing-indices
sed "s/config_is_read_only\(.\) => false,/config_is_read_only\1 => true,/" /var/www/html/config/config.php > /var/www/html/config/config.php.tmp
mv /var/www/html/config/config.php.tmp /var/www/html/config/config.php