From 827e2765f366d922485b24dc6cdee19dc07a95be Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 9 Dec 2017 15:26:58 +0100 Subject: [PATCH] DietPi-Software | ownCloud/Nextcloud: Tiny polish --- dietpi/dietpi-software | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 2043019d2d..2dead33b6a 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -4162,6 +4162,9 @@ _EOF_ #Install if (( $? == 0 )); then + # Install necessary PHP modules: https://doc.owncloud.org/server/latest/admin_manual/installation/source_installation.html#php-extensions + AGI "$PHP_APT_PACKAGE_NAME"-intl "$PHP_APT_PACKAGE_NAME"-redis + if [ ! -f /etc/apt/sources.list.d/owncloud.list ] && [ ! -d /var/www/owncloud ]; then wget "$INSTALL_URL_ADDRESS" -O owncloud.key_or_zip @@ -4183,8 +4186,6 @@ _EOF_ fi - # Install necessary PHP modules: https://doc.owncloud.org/server/latest/admin_manual/installation/source_installation.html#php-extensions - AGI "$PHP_APT_PACKAGE_NAME"-intl "$PHP_APT_PACKAGE_NAME"-redis AGI owncloud-files 2> /dev/null else @@ -4209,6 +4210,7 @@ _EOF_ # Install necessary PHP modules: https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation AGI "$PHP_APT_PACKAGE_NAME"-intl "$PHP_APT_PACKAGE_NAME"-redis + if [ ! -d /var/www/nextcloud ]; then wget "$INSTALL_URL_ADDRESS" -O package.zip @@ -9127,8 +9129,8 @@ _EOF_ # Enable necessary PHP modules: https://doc.owncloud.org/server/latest/admin_manual/installation/source_installation.html#php-extensions ${PHP_APT_PACKAGE_NAME}enmod curl gd intl json pdo_mysql opcache apcu redis - # Following modules are not always enabled since Stretch: - if (( $DISTRO >= 4 )); then + # Following modules are switchable since Stretch: + if (( $DISTRO > 3 )); then phpenmod ctype dom fileinfo iconv mbstring posix simplexml xmlwriter xmlreader zip exif @@ -9170,7 +9172,7 @@ _EOF_ cp /DietPi/dietpi/conf/nginx.sites-dietpi.owncloud.config $owncloud_config # Stretch: Use PHP7.0 socket and set 'fastcgi_request_buffering off'; - if (( $DISTRO >= 4 )); then + if (( $DISTRO > 3 )); then sed -i "s#/run/php5-fpm.sock#/run/php/php7.0-fpm.sock#g" $owncloud_config sed -i "s/#fastcgi_request_buffering off;/fastcgi_request_buffering off;/g" $owncloud_config @@ -9207,7 +9209,7 @@ _EOF_ chmod +x /usr/local/bin/occ # Adjusting config file: - local config_php="/var/www/owncloud/config/config.php" + local config_php='/var/www/owncloud/config/config.php' # Terminal installation: mkdir -p "$FP_DIETPI_USERDATA_DIRECTORY"/owncloud_data @@ -9293,8 +9295,8 @@ _EOF_ # Enable necessary PHP modules: https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation ${PHP_APT_PACKAGE_NAME}enmod curl gd intl json pdo_mysql opcache apcu redis - # Solve: https://github.com/Fourdee/DietPi/issues/1067#issuecomment-335200352 - if (( $DISTRO >= 4 )); then + # Following modules are switchable since Stretch: + if (( $DISTRO > 3 )); then phpenmod ctype dom fileinfo iconv mbstring posix simplexml xmlwriter xmlreader zip exif @@ -9341,7 +9343,7 @@ _EOF_ cp /DietPi/dietpi/conf/nginx.sites-dietpi.nextcloud.config $nextcloud_config # Stretch: Use PHP7.0 socket and set 'fastcgi_request_buffering off'; - if (( $DISTRO >= 4 )); then + if (( $DISTRO > 3 )); then sed -i "s#/run/php5-fpm.sock#/run/php/php7.0-fpm.sock#g" $nextcloud_config sed -i "s/#fastcgi_request_buffering off;/fastcgi_request_buffering off;/g" $nextcloud_config @@ -9378,7 +9380,7 @@ _EOF_ chmod +x /usr/local/bin/ncc # Adjusting config file: - local config_php="/var/www/nextcloud/config/config.php" + local config_php='/var/www/nextcloud/config/config.php' # Terminal installation: mkdir -p "$FP_DIETPI_USERDATA_DIRECTORY"/nextcloud_data