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:
authornachoparker <nacho@ownyourbits.com>2018-05-20 17:30:21 +0300
committernachoparker <nacho@ownyourbits.com>2018-05-20 17:32:54 +0300
commitfac99a62899fb0a6a341b9657826c0b49fded037 (patch)
tree30f011909a178f41865029cd9f4731a6c2f3beea
parentc97acf8a8e7aa1ba17d5f5d7379635dd82259563 (diff)
fix update httpd log location in virtual host after nc-datadirv0.56.6
-rw-r--r--changelog.md4
-rw-r--r--etc/ncp-config.d/nc-datadir.sh4
-rwxr-xr-xupdate.sh7
3 files changed, 14 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index b325075a..d6baf5a7 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,5 +1,7 @@
-[v0.56.5](https://github.com/nextcloud/nextcloudpi/commit/fb75d21) (2018-05-20) ncp-autoupdate: dont return 0 if no updates available
+[v0.56.6](https://github.com/nextcloud/nextcloudpi/commit/e48323d) (2018-05-20) fix update httpd log location in virtual host after nc-datadir
+
+[v0.56.5](https://github.com/nextcloud/nextcloudpi/commit/d54b243) (2018-05-20) ncp-autoupdate: dont return 0 if no updates available
[v0.56.4 ](https://github.com/nextcloud/nextcloudpi/commit/656d2d8) (2018-05-18) nc-info: change port checker providers
diff --git a/etc/ncp-config.d/nc-datadir.sh b/etc/ncp-config.d/nc-datadir.sh
index bd98ef8d..b3e5a988 100644
--- a/etc/ncp-config.d/nc-datadir.sh
+++ b/etc/ncp-config.d/nc-datadir.sh
@@ -92,6 +92,10 @@ configure()
# update fail2ban logpath
sed -i "s|logpath =.*nextcloud.log|logpath = $DATADIR_/nextcloud.log|" /etc/fail2ban/jail.conf
+ # update httpd log location in virtual host
+ sed -i "s|CustomLog.*|CustomLog $DATADIR_/access.log combined|" /etc/apache2/sites-available/nextcloud.conf
+ sed -i "s|ErrorLog .*|ErrorLog $DATADIR_/error.log|" /etc/apache2/sites-available/nextcloud.conf
+
# datadir
sudo -u www-data php occ config:system:set datadirectory --value="$DATADIR_"
sudo -u www-data php occ config:system:set logfile --value="$DATADIR_/nextcloud.log"
diff --git a/update.sh b/update.sh
index 505ef8c7..75651fe1 100755
--- a/update.sh
+++ b/update.sh
@@ -145,6 +145,7 @@ done
install_script nc-restore.sh
cd - &>/dev/null
+ # fix exit status autoupdate
F="$CONFDIR"/nc-autoupdate-ncp.sh
grep -q '^ACTIVE_=yes$' "$F" && {
cd "$CONFDIR" &>/dev/null
@@ -158,6 +159,12 @@ done
cd - &>/dev/null
}
+ # fix update httpd log location in virtual host after nc-datadir
+ DATADIR="$( grep datadirectory /var/www/nextcloud/config/config.php | awk '{ print $3 }' | grep -oP "[^']*[^']" | head -1 )"
+ sed -i "s|CustomLog.*|CustomLog $DATADIR/access.log combined|" /etc/apache2/sites-available/nextcloud.conf
+ sed -i "s|ErrorLog .*|ErrorLog $DATADIR/error.log|" /etc/apache2/sites-available/nextcloud.conf
+
+
} # end - only live updates
exit 0