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:
authornacho <nacho@ownyourbits.com>2018-09-16 17:01:49 +0300
committernacho <nacho@ownyourbits.com>2018-09-16 17:48:03 +0300
commit6a755c31a5cfb78cb03182474fc884e3b96fe0c9 (patch)
tree909606e33c61c9b574585c181199c4618d4451f9
parentcdaec0588bd8a836829d80bfc83d4f99a0ab9bc1 (diff)
nc-prettyURL: fixesv0.59.9
-rw-r--r--etc/ncp-config.d/nc-prettyURL.sh (renamed from etc/ncp-config.d/nc-prettyURL)31
1 files changed, 8 insertions, 23 deletions
diff --git a/etc/ncp-config.d/nc-prettyURL b/etc/ncp-config.d/nc-prettyURL.sh
index 44ec674a..071cd31a 100644
--- a/etc/ncp-config.d/nc-prettyURL
+++ b/etc/ncp-config.d/nc-prettyURL.sh
@@ -8,14 +8,8 @@
ACTIVE_=no
-DOMAIN_=$(sudo -u www-data php /var/www/nextcloud/occ config:system:get overwrite.cli.url)
-
DESCRIPTION="Set pretty URLs (no index.php in URL)"
INFOTITLE="PrettyURL notes"
-INFO="Use a domain where your cloud is accessible, e.g. https://mycloud.mydomain.com.
-Make sure that you use HTTP or HTTPS, depending on your setup.
-
-You are not sure about it? Check the domain in your browser."
NCDIR=/var/www/nextcloud
OCC="$NCDIR/occ"
@@ -25,26 +19,17 @@ install() { :; }
configure()
{
[[ $ACTIVE_ != "yes" ]] && {
- sudo -u www-data php $OCC config:system:set htaccess.RewriteBase --value=""
- sudo -u www-data php $OCC maintenance:update:htaccess
- systemctl apache2 restart
-
+ sudo -u www-data php "$OCC" config:system:set htaccess.RewriteBase --value=""
+ sudo -u www-data php "$OCC" maintenance:update:htaccess
echo "Your cloud does no longer have a pretty domain name."
- return 0
- }
-
- [[ $DOMAIN_ = "" ]] && {
- echo "Your specified domain is invalid."
- return 1
+ } || {
+ sudo -u www-data php "$OCC" config:system:set htaccess.RewriteBase --value="/"
+ sudo -u www-data php "$OCC" maintenance:update:htaccess
+ a2enmod env
+ echo "Your cloud now has 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
- systemctl apache2 restart
-
- echo "Your cloud now has a pretty domain name."
+ bash -c "sleep 2 && service apache2 reload" &>/dev/null &
return 0
-
}
# License