Skip to content

Commit 1a2b772

Browse files
author
Daniel Hansson
authored
fix redis bug and install disabled apps
1 parent 6aa291c commit 1a2b772

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

nextcloud_update.sh

+22-12
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,6 @@ THEME_NAME=""
2222
# Must be root
2323
root_check
2424

25-
msg_box "There's a bug in the Redis update process, we are working on it.
26-
Please try to upgrade again later"
27-
exit
28-
2925
# Check if dpkg or apt is running
3026
is_process_running apt
3127
is_process_running dpkg
@@ -55,17 +51,31 @@ then
5551
fi
5652

5753
# Update Redis PHP extension
58-
if type pecl > /dev/null 2>&1
54+
echo "Trying to upgrade the Redis PECL extenstion..."
55+
if ! pecl list | grep redis >/dev/null 2>&1
56+
then
57+
if dpkg -l | grep php7.2 > /dev/null 2>&1
58+
then
59+
install_if_not php7.2-dev
60+
else
61+
install_if_not php7.0-dev
62+
fi
63+
apt purge php-redis -y
64+
apt autoremove -y
65+
pecl channel-update pecl.php.net
66+
yes no | pecl install redis
67+
service redis-server restart
68+
elif pecl list | grep redis >/dev/null 2>&1
5969
then
60-
if type php7.2 > /dev/null 2>&1
70+
if dpkg -l | grep php7.2 > /dev/null 2>&1
6171
then
62-
install_if_not php7.2-dev
72+
install_if_not php7.2-dev
6373
else
64-
install_if_not php7.0-dev
74+
install_if_not php7.0-dev
6575
fi
66-
echo "Trying to upgrade the Redis Pecl extenstion..."
67-
yes no | pecl upgrade redis
68-
service redis-server restart
76+
pecl channel-update pecl.php.net
77+
yes no | pecl upgrade redis
78+
service redis-server restart
6979
fi
7080

7181
# Update adminer
@@ -326,7 +336,7 @@ fi
326336
check_command service apache2 start
327337

328338
# Recover apps that exists in the backed up apps folder
329-
# run_static_script recover_apps
339+
run_static_script recover_apps
330340

331341
# Enable Apps
332342
if [ -d "$SNAPDIR" ]

0 commit comments

Comments
 (0)