Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion apps/notify_push.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,13 @@ fi
# Check TLS
check_nextcloud_https "Notify Push"

# Get the NCDOMAIN variable
if [ -z $NCDOMAIN ]
then
ncdomain
fi

# Check apache conf
NCDOMAIN=$(nextcloud_occ_no_check config:system:get overwrite.cli.url | sed 's|https://||;s|/||')
if ! [ -f "$SITES_AVAILABLE/$NCDOMAIN.conf" ]
then
msg_box "It seems like you haven't used the built-in 'Activate TLS' script to enable 'Let's Encrypt!' \
Expand Down
16 changes: 13 additions & 3 deletions lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,13 @@ fi

# Check if Nextcloud is installed with TLS
check_nextcloud_https() {
if ! nextcloud_occ_no_check config:system:get overwrite.cli.url | grep -q "https"
if ! nextcloud_occ_no_check config:system:get overwrite.cli.url | grep -q "https"
then
# Check if it's used by any of the Documentserver apps and adopt the message to that
if [ "$1" == 'Collabora (Docker)' ] || [ "$1" == 'OnlyOffice (Docker)' ]
then
if [ "$1" == 'Collabora (Docker)' ] || [ "$1" == 'OnlyOffice (Docker)' ]
ncdomain
if ! curl -s https://"$NCDOMAIN"/status.php | grep -q 'installed":true'
then
msg_box "Sorry, but Nextcloud needs to be run on HTTPS.
You can easily activate TLS (HTTPS) by running the Let's Encrypt script.
Expand All @@ -758,7 +762,12 @@ More info here: http://shortio.hanssonit.se/1EAgBmPyFc
To run this script again, just exectue 'sudo bash $SCRIPTS/menu.sh' and choose:
Additional Apps --> Documentserver --> $1."
exit
else
fi
else
# Adopt the error message to anything else but the Documentserver apps
ncdomain
if ! curl -s https://"$NCDOMAIN"/status.php | grep -q 'installed":true'
then
msg_box "Sorry, but Nextcloud needs to be run on HTTPS.
You can easily activate TLS (HTTPS) by running the Let's Encrypt script.
More info here: http://shortio.hanssonit.se/1EAgBmPyFc
Expand All @@ -768,6 +777,7 @@ Additional Apps --> $1."
exit
fi
fi
fi
}

restart_webserver() {
Expand Down