Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/vm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hansson <github@hanssonit.se>2019-02-19 23:24:46 +0300
committerGitHub <noreply@github.com>2019-02-19 23:24:46 +0300
commit512ecaa6ce40de2db1a0d43537cb6022d6473445 (patch)
treedb103dbf4b5cf54e8f1a1d0b82c011cc9e59fe8a /nextcloud_update.sh
parent3bd2892dae01dc867be74e5ba8e9911f7838ed70 (diff)
check if redis.so is enabled (#787)
Diffstat (limited to 'nextcloud_update.sh')
-rw-r--r--nextcloud_update.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/nextcloud_update.sh b/nextcloud_update.sh
index ba1d9dd5..9cb76829 100644
--- a/nextcloud_update.sh
+++ b/nextcloud_update.sh
@@ -78,6 +78,20 @@ then
pecl channel-update pecl.php.net
yes no | pecl install redis
service redis-server restart
+ # Check if redis.so is enabled
+ # PHP 7.0 apache
+ if [ -f /etc/php/7.0/apache2/php.ini ]
+ then
+ ! [[ "$(grep -R extension=redis.so /etc/php/7.0/apache2/php.ini)" == "extension=redis.so" ]] > /dev/null 2>&1 && echo "extension=redis.so" >> /etc/php/7.0/apache2/php.ini
+ # PHP 7.2 apache
+ elif [ -f /etc/php/7.2/apache2/php.ini ]
+ then
+ ! [[ "$(grep -R extension=redis.so /etc/php/7.2/apache2/php.ini)" == "extension=redis.so" ]] > /dev/null 2>&1 && echo "extension=redis.so" >> /etc/php/7.2/apache2/php.ini
+ # PHP 7.2 fpm
+ elif [ -f "$PHP_INI" ]
+ then
+ ! [[ "$(grep -R extension=redis.so "$PHP_INI")" == "extension=redis.so" ]] > /dev/null 2>&1 && echo "extension=redis.so" >> "$PHP_INI"
+ fi
restart_webserver
elif pecl list | grep redis >/dev/null 2>&1
then
@@ -90,6 +104,20 @@ then
pecl channel-update pecl.php.net
yes no | pecl upgrade redis
service redis-server restart
+ # Check if redis.so is enabled
+ # PHP 7.0 apache
+ if [ -f /etc/php/7.0/apache2/php.ini ]
+ then
+ ! [[ "$(grep -R extension=redis.so /etc/php/7.0/apache2/php.ini)" == "extension=redis.so" ]] > /dev/null 2>&1 && echo "extension=redis.so" >> /etc/php/7.0/apache2/php.ini
+ # PHP 7.2 apache
+ elif [ -f /etc/php/7.2/apache2/php.ini ]
+ then
+ ! [[ "$(grep -R extension=redis.so /etc/php/7.2/apache2/php.ini)" == "extension=redis.so" ]] > /dev/null 2>&1 && echo "extension=redis.so" >> /etc/php/7.2/apache2/php.ini
+ # PHP 7.2 fpm
+ elif [ -f "$PHP_INI" ]
+ then
+ ! [[ "$(grep -R extension=redis.so "$PHP_INI")" == "extension=redis.so" ]] > /dev/null 2>&1 && echo "extension=redis.so" >> "$PHP_INI"
+ fi
restart_webserver
fi