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-03-29 13:57:39 +0300
committernachoparker <nacho@ownyourbits.com>2018-04-01 19:08:10 +0300
commit925c6fe7e5ef094f61fb701a9aeb3d9618ac55b8 (patch)
tree239de40dba9a97aecf05fc24a14785afba75d622 /update.sh
parentf31caf4d0411423230c58cbfed04072bea0a2d2e (diff)
ncp-web: use random passwords for NC and ncp-webv0.53.7
Diffstat (limited to 'update.sh')
-rwxr-xr-xupdate.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/update.sh b/update.sh
index c34d414f..376bdb21 100755
--- a/update.sh
+++ b/update.sh
@@ -270,6 +270,30 @@ EOF
systemctl disable log2ram
systemctl stop log2ram
}
+
+ # add new virtual host for initial password setup
+ cat > /etc/apache2/sites-available/ncp-activation.conf <<EOF
+<VirtualHost _default_:443>
+ DocumentRoot /var/www/ncp-web/
+ SSLEngine on
+ SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
+ SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
+
+</VirtualHost>
+<Directory /var/www/ncp-web/>
+ <RequireAll>
+
+ <RequireAny>
+ Require host localhost
+ Require local
+ Require ip 192.168
+ Require ip 172
+ Require ip 10
+ </RequireAny>
+
+ </RequireAll>
+</Directory>
+EOF
} # end - only live updates
exit 0