2023-04-03 13:23:47 +00:00
|
|
|
apiVersion: v1
|
|
|
|
kind: ConfigMap
|
|
|
|
metadata:
|
|
|
|
name: script-configmap
|
|
|
|
data:
|
2023-04-03 13:50:05 +00:00
|
|
|
nc-upgrade: |
|
2023-04-03 13:23:47 +00:00
|
|
|
#!/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 upgrade
|
|
|
|
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
|
|
|
|
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
|