Skip to content

Commit

Permalink
Merge pull request #1284 from MichaIng/patch-4
Browse files Browse the repository at this point in the history
DietPi-Software | ownCloud/Nextcloud: Tiny polish
  • Loading branch information
Fourdee authored Dec 9, 2017
2 parents d02af8e + 827e276 commit 3184340
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 3184340

Please sign in to comment.