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

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/update.sh b/update.sh
index 10120251..1f1b9d5a 100755
--- a/update.sh
+++ b/update.sh
@@ -163,6 +163,10 @@ done
sed -i "s|CustomLog.*|CustomLog /var/log/apache2/nc-access.log combined|" /etc/apache2/sites-available/nextcloud.conf
sed -i "s|ErrorLog .*|ErrorLog /var/log/apache2/nc-error.log|" /etc/apache2/sites-available/nextcloud.conf
+ # fix php cli tmpdir for running instances
+ DATADIR="$( grep datadirectory /var/www/nextcloud/config/config.php | awk '{ print $3 }' | grep -oP "[^']*[^']" | head -1 )"
+ sed -i "s|^;\?upload_tmp_dir =.*$|upload_tmp_dir = $DATADIR|" /etc/php/7.0/cli/php.ini
+
} # end - only live updates
exit 0