run-parts.sh: Notify docker users about discontinuation of NCP docker

Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias Knöppler 2023-04-15 02:17:53 +02:00
parent 0de39f155e
commit f72b11d938
No known key found for this signature in database
GPG Key ID: 3510056072886A8F

View File

@ -26,6 +26,16 @@ CURRENT_NC_MAJ="${CURRENT_NC_VERSION%%.*}"
exit 1
}
DOCKER_DISCONTINUATION_ALERT="ATTENTION: NextcloudPi docker is being discontinued after Nextcloud 25! Minor NC updates and security updates and fixes will be provided until 2023/11.
Learn more in the official announcement: https://help.nextcloud.com/t/nextcloudpi-planning-to-discontinue-its-docker-version-with-nc-25"
echo -e "
\033[1;31m$DOCKER_DISCONTINUATION_ALERT\033[0m
Continue in 5 seconds..."
sleep 5
# wrapper to simulate update-rc.d
cat > /usr/local/sbin/update-rc.d <<'EOF'
@ -75,6 +85,9 @@ fi
# wait for trap from 'docker stop'
echo "Init done"
[[ -f /data/docker_discontinuation_alert_sent ]] || \
( . /usr/local/etc/library.sh; notify_admin "$DOCKER_DISCONTINUATION_ALERT" && touch /data/docker_discontinuation_alert_sent )
while true; do sleep 0.5; done