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 'bin/ncp/CONFIG/nc-httpsonly.sh')
-rw-r--r--bin/ncp/CONFIG/nc-httpsonly.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/bin/ncp/CONFIG/nc-httpsonly.sh b/bin/ncp/CONFIG/nc-httpsonly.sh
index a70bac03..147dc0aa 100644
--- a/bin/ncp/CONFIG/nc-httpsonly.sh
+++ b/bin/ncp/CONFIG/nc-httpsonly.sh
@@ -12,7 +12,11 @@
configure()
{
[[ -f /.ncp-image ]] && return 0
- [[ $ACTIVE == "no" ]] && local opt=Off proto=http || local opt=On proto=https
+ if [[ $ACTIVE == "no" ]]; then
+ local opt=Off proto=https
+ else
+ local opt=On proto=http
+ fi
sed -i "s|RewriteEngine .*|RewriteEngine $opt|" /etc/apache2/sites-available/000-default.conf
ncc config:system:set overwriteprotocol --value="${proto}"
apachectl -k graceful