From 5c6b37a4f67d4fbd158c622db88fdf697116b200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kn=C3=B6ppler?= <6317548+theCalcaholic@users.noreply.github.com> Date: Sun, 28 Apr 2024 18:44:46 +0200 Subject: [PATCH] ncp.sh,nc-passwd.sh: Add activation hint in tty login screen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com> --- bin/ncp/CONFIG/nc-passwd.sh | 1 + ncp.sh | 4 ++++ update.sh | 4 +--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/ncp/CONFIG/nc-passwd.sh b/bin/ncp/CONFIG/nc-passwd.sh index e015117d..2f85b53f 100644 --- a/bin/ncp/CONFIG/nc-passwd.sh +++ b/bin/ncp/CONFIG/nc-passwd.sh @@ -29,6 +29,7 @@ configure() a2dissite ncp-activation a2ensite ncp 001-nextcloud apachectl -k graceful + sed -i -e 's/^NCP is not activated yet.*$//' /etc/issue # Trusted Domain (local/public IP), also configures notify_push bash /usr/local/bin/nextcloud-domain.sh diff --git a/ncp.sh b/ncp.sh index b907c74a..8813c60c 100644 --- a/ncp.sh +++ b/ncp.sh @@ -244,6 +244,10 @@ EOF #!/bin/bash /usr/local/bin/ncp-check-updates EOF + + echo ' +NCP is not activated yet. Please enter https://nextcloudpi.local or this instance'"'"'s local IP address in your webbrowser to complete activation. You can find detailed instructions at https://nextcloudpi.com/activate +' >> /etc/issue chmod a+x /etc/update-motd.d/* ## HOSTNAME AND mDNS diff --git a/update.sh b/update.sh index 78e9fed2..88a5e65c 100755 --- a/update.sh +++ b/update.sh @@ -201,9 +201,7 @@ check_distro "$NCPCFG" && check_distro etc/ncp.cfg || { cfg="$(jq '.release = "'$release_new'"' <<<"$cfg")" echo "$cfg" > /usr/local/etc/ncp-recommended.cfg - [[ -f /.dockerenv ]] && \ - msg="Update to $release_new available. Get the latest container to upgrade" || \ - msg="Update to $release_new available. Type 'sudo ncp-dist-upgrade' to upgrade" + msg="Update to $release_new available. Type 'sudo ncp-dist-upgrade' to upgrade" echo "${msg}" notify_admin "New distribution available" "${msg}" wall "${msg}"