Skip to content

Commit 5d28347

Browse files
committed
Add upgrade script for default php version www.conf
www.conf is used for Roundcube, Rainloop and phpmyadmin Removal of the "www.conf" php version will cause issues with Rainloop not working. Current script updates it to the latests version of PHP installed. If that is not wanted use this script + Updated permission upgrade_php.sh
1 parent 5b7e43d commit 5d28347

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
# Update www.conf to the a different version so users can safely deleted older php version.
3+
# www.conf is used for Roundcube, Rainloop and phpmyadmin
4+
# Removal of the "www.conf" php version will cause issues with Rainloop not working. Current script updates it to the latests version of PHP installed. If that is not wanted use this script
5+
6+
version=$1
7+
if [ ! -x "$(command -v php)" ]; then
8+
echo "PHP is not installed. Aborting."
9+
exit 1
10+
fi
11+
12+
# Verify php version format
13+
if [[ ! $version =~ ^[0-9]\.[0-9]+ ]]; then
14+
echo "The PHP version format is invalid, it should look like [0-9].[0-9]."
15+
echo "Example: 7.0, 7.4"
16+
exit
17+
fi
18+
19+
if [ ! -f /etc/php/$version/fpm/pool.d/dummy.conf ]; then
20+
echo "PHP versions doesn't exists"
21+
exit;
22+
fi
23+
24+
rm -f /etc/php/*/fpm/pool.d/www.conf
25+
cp -f $HESTIA/install/deb/php-fpm/www.conf /etc/php/$version/fpm/pool.d/www.conf
26+
$HESTIA/bin/v-restart-web-backend

install/upgrade/manual/upgrade_php.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)