File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 4141# Check TLS
4242check_nextcloud_https " Notify Push"
4343
44+ # Get the NCDOMAIN variable
45+ if [ -z $NCDOMAIN ]
46+ then
47+ ncdomain
48+ fi
49+
4450# Check apache conf
45- NCDOMAIN=$( nextcloud_occ_no_check config:system:get overwrite.cli.url | sed ' s|https://||;s|/||' )
4651if ! [ -f " $SITES_AVAILABLE /$NCDOMAIN .conf" ]
4752then
4853 msg_box " It seems like you haven't used the built-in 'Activate TLS' script to enable 'Let's Encrypt!' \
Original file line number Diff line number Diff line change 747747
748748# Check if Nextcloud is installed with TLS
749749check_nextcloud_https () {
750- if ! nextcloud_occ_no_check config:system:get overwrite.cli.url | grep -q " https"
750+ if ! nextcloud_occ_no_check config:system:get overwrite.cli.url | grep -q " https"
751+ then
752+ # Check if it's used by any of the Documentserver apps and adopt the message to that
753+ if [ " $1 " == ' Collabora (Docker)' ] || [ " $1 " == ' OnlyOffice (Docker)' ]
751754 then
752- if [ " $1 " == ' Collabora (Docker)' ] || [ " $1 " == ' OnlyOffice (Docker)' ]
755+ ncdomain
756+ if ! curl -s https://" $NCDOMAIN " /status.php | grep -q ' installed":true'
753757 then
754758 msg_box " Sorry, but Nextcloud needs to be run on HTTPS.
755759You can easily activate TLS (HTTPS) by running the Let's Encrypt script.
@@ -758,7 +762,12 @@ More info here: http://shortio.hanssonit.se/1EAgBmPyFc
758762To run this script again, just exectue 'sudo bash $SCRIPTS /menu.sh' and choose:
759763Additional Apps --> Documentserver --> $1 ."
760764 exit
761- else
765+ fi
766+ else
767+ # Adopt the error message to anything else but the Documentserver apps
768+ ncdomain
769+ if ! curl -s https://" $NCDOMAIN " /status.php | grep -q ' installed":true'
770+ then
762771 msg_box " Sorry, but Nextcloud needs to be run on HTTPS.
763772You can easily activate TLS (HTTPS) by running the Let's Encrypt script.
764773More info here: http://shortio.hanssonit.se/1EAgBmPyFc
@@ -768,6 +777,7 @@ Additional Apps --> $1."
768777 exit
769778 fi
770779 fi
780+ fi
771781}
772782
773783restart_webserver () {
You can’t perform that action at this time.
0 commit comments