ncp.sh,nc-passwd.sh: Add activation hint in tty login screen

Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias Knöppler 2024-04-28 18:44:46 +02:00 committed by Tobias K
parent f58852ea27
commit 5c6b37a4f6
No known key found for this signature in database
GPG Key ID: 44FD368932E645C1
3 changed files with 6 additions and 3 deletions

View File

@ -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

4
ncp.sh
View File

@ -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

View File

@ -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}"