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>2017-11-29 20:40:42 +0300
committernachoparker <nacho@ownyourbits.com>2017-11-29 20:40:56 +0300
commit7aaf31c2312a98ae4dae5389d64c260ea21b1738 (patch)
tree5614bb522d3533223354bf3e257fc428c191e886
parent1e2de68468d4a21bd4402667e5f2d59bf7ba7231 (diff)
nc-import: fix ncp-web appearing to fail when activating options that restart httpdv0.39.2
-rw-r--r--etc/nextcloudpi-config.d/letsencrypt.sh2
-rw-r--r--etc/nextcloudpi-config.d/modsecurity.sh2
-rw-r--r--etc/nextcloudpi-config.d/nc-httpsonly.sh2
-rw-r--r--etc/nextcloudpi-config.d/nc-import-ncp.sh10
-rw-r--r--etc/nextcloudpi-config.d/nc-webui.sh2
5 files changed, 14 insertions, 4 deletions
diff --git a/etc/nextcloudpi-config.d/letsencrypt.sh b/etc/nextcloudpi-config.d/letsencrypt.sh
index 2129f818..0c7d3fa7 100644
--- a/etc/nextcloudpi-config.d/letsencrypt.sh
+++ b/etc/nextcloudpi-config.d/letsencrypt.sh
@@ -78,7 +78,7 @@ configure()
sudo -u www-data php $OCC config:system:set overwrite.cli.url --value=https://$DOMAIN_
# delayed in bg so it does not kill the connection, and we get AJAX response
- bash -c "sleep 2 && service apache2 restart" &>/dev/null &
+ bash -c "sleep 2 && service apache2 reload" &>/dev/null &
rm -rf $NCDIR/.well-known
return 0
}
diff --git a/etc/nextcloudpi-config.d/modsecurity.sh b/etc/nextcloudpi-config.d/modsecurity.sh
index 2a88dcf6..ec86bc38 100644
--- a/etc/nextcloudpi-config.d/modsecurity.sh
+++ b/etc/nextcloudpi-config.d/modsecurity.sh
@@ -102,7 +102,7 @@ EOF
[[ $ACTIVE_ == "yes" ]] && a2enmod security2 &>/dev/null || a2dismod security2 &>/dev/null
# delayed in bg so it does not kill the connection, and we get AJAX response
- bash -c "sleep 2 && service apache2 restart" &>/dev/null &
+ bash -c "sleep 2 && service apache2 reload" &>/dev/null &
}
# License
diff --git a/etc/nextcloudpi-config.d/nc-httpsonly.sh b/etc/nextcloudpi-config.d/nc-httpsonly.sh
index f36f94f8..d015bc46 100644
--- a/etc/nextcloudpi-config.d/nc-httpsonly.sh
+++ b/etc/nextcloudpi-config.d/nc-httpsonly.sh
@@ -24,7 +24,7 @@ configure()
echo "Forcing HTTPS $OPT"
# delayed in bg so it does not kill the connection, and we get AJAX response
- bash -c "sleep 2 && service apache2 restart" &>/dev/null &
+ bash -c "sleep 2 && service apache2 reload" &>/dev/null &
}
install() { :; }
diff --git a/etc/nextcloudpi-config.d/nc-import-ncp.sh b/etc/nextcloudpi-config.d/nc-import-ncp.sh
index 5fda3538..afec2072 100644
--- a/etc/nextcloudpi-config.d/nc-import-ncp.sh
+++ b/etc/nextcloudpi-config.d/nc-import-ncp.sh
@@ -24,6 +24,10 @@ configure()
mkdir -p "$TMP"
tar -xf "$FILE_" -C "$TMP"
+ # UGLY workaround to prevent apache from restarting upon activating some extras
+ # which leads to the operation appearing to fail in ncp-web
+ echo "invalid_op" >> /etc/apache2/sites-available/000-default.conf
+
# restore configuration and activate
for file in /"$TMP"/*; do
local SCRIPT="$( basename "$file" .cfg ).sh"
@@ -41,9 +45,15 @@ configure()
grep -q "^ACTIVE_=yes" "$SCRIPT" && echo && activate_script "$SCRIPT"
done
+ # Fix invalid configuration
+ sed -i "/^invalid_op/d" /etc/apache2/sites-available/000-default.conf
+
# cleanup
rm -rf "$TMP"
echo -e "\nconfiguration restored"
+
+ # delayed in bg so it does not kill the connection, and we get AJAX response
+ bash -c "sleep 2 && service apache2 reload" &>/dev/null &
}
install() { :; }
diff --git a/etc/nextcloudpi-config.d/nc-webui.sh b/etc/nextcloudpi-config.d/nc-webui.sh
index 346f6833..e9709cdc 100644
--- a/etc/nextcloudpi-config.d/nc-webui.sh
+++ b/etc/nextcloudpi-config.d/nc-webui.sh
@@ -27,7 +27,7 @@ configure()
fi
# delayed in bg so it does not kill the connection, and we get AJAX response
- bash -c "sleep 2 && service apache2 restart" &>/dev/null &
+ bash -c "sleep 2 && service apache2 reload" &>/dev/null &
}
install() { :; }