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:
authorTomTurnschuh <36013390+TomTurnschuh@users.noreply.github.com>2018-10-07 18:22:39 +0300
committernachoparker <nacho@ownyourbits.com>2018-10-07 18:22:39 +0300
commit54e09689ce236b4e55bfbc60f8184a158eac415f (patch)
treea2e5353ecb06868d30925ae6f7f1f153cf75a851
parent5e3d411f4c94c02581509272f5b1f424ebc6465f (diff)
nc-prettyURL: Catch failure of maintenance:update:htaccess (#654)v0.62.7
-rw-r--r--changelog.md1
-rw-r--r--etc/ncp-config.d/nc-prettyURL.sh15
-rwxr-xr-xupdate.sh1
3 files changed, 16 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md
index bbd31dfd..ba33535c 100644
--- a/changelog.md
+++ b/changelog.md
@@ -1,4 +1,3 @@
-
[v0.62.6](https://github.com/nextcloud/nextcloudpi/commit/d069004) (2018-10-06) nc-limits: fix PHP service restart
[v0.62.5](https://github.com/nextcloud/nextcloudpi/commit/0bf6045) (2018-10-03) nc-update-nc: dont fix the news app if there is no news app
diff --git a/etc/ncp-config.d/nc-prettyURL.sh b/etc/ncp-config.d/nc-prettyURL.sh
index 83b6b726..0039f5f3 100644
--- a/etc/ncp-config.d/nc-prettyURL.sh
+++ b/etc/ncp-config.d/nc-prettyURL.sh
@@ -16,6 +16,13 @@ OCC="$NCDIR/occ"
install() { :; }
+isactive()
+{
+ local REWRITEBASE
+ REWRITEBASE="$( grep RewriteBase /var/www/nextcloud/.htaccess )" || return 1
+ [[ $REWRITEBASE != 1 ]]
+}
+
configure()
{
# make sure overwrite.cli.url end with a '/'
@@ -25,10 +32,18 @@ configure()
[[ $ACTIVE_ != "yes" ]] && {
sudo -u www-data php "$OCC" config:system:set htaccess.RewriteBase --value=""
sudo -u www-data php "$OCC" maintenance:update:htaccess
+ [[ $? -ne 0 ]] && {
+ echo "There has been an error."
+ return 1
+ }
echo "Your cloud does no longer have a pretty domain name."
} || {
sudo -u www-data php "$OCC" config:system:set htaccess.RewriteBase --value="/"
sudo -u www-data php "$OCC" maintenance:update:htaccess
+ [[ $? -ne 0 ]] && {
+ echo "There has been an error."
+ return 1
+ }
echo "Your cloud now has a pretty domain name."
}
bash -c "sleep 2 && service apache2 reload" &>/dev/null &
diff --git a/update.sh b/update.sh
index c175a699..89f52d7f 100755
--- a/update.sh
+++ b/update.sh
@@ -211,6 +211,7 @@ Package: *
Pin: release n=stretch
Pin-Priority: 600
EOF
+
apt-get update
apt-get purge -y php7.0-*