From 709cd60612516d128a6c8878548a26a352ae33e4 Mon Sep 17 00:00:00 2001 From: nachoparker Date: Sun, 25 Jun 2017 17:54:44 +0200 Subject: [PATCH] Show current version in MOTD when there is an update available --- bin/ncp-check-updates | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/ncp-check-updates b/bin/ncp-check-updates index c30176abd..f3f9bf611 100755 --- a/bin/ncp-check-updates +++ b/bin/ncp-check-updates @@ -2,11 +2,12 @@ # print message if an update is available -VERFILE=/var/run/.ncp-latest-version +VERFILE=/usr/local/etc/ncp-version +LATEST=/var/run/.ncp-latest-version if ncp-test-updates; then - echo -e "\nNextCloudPi \e[1m$( cat $VERFILE )\e[0m available!!" - echo -e "update through 'nextcloudpi-config' or type 'sudo ncp-update'" + echo -e "\nNextCloudPi \e[1m$( cat $VERFILE)\e[0m is outdated" + echo -e "update to \e[1m$( cat $LATEST )\e[0m through 'nextcloudpi-config' or type 'sudo ncp-update'" else - echo -e "\nNextCloudPi \e[1m$( cat /usr/local/etc/ncp-version )\e[0m is up to date" + echo -e "\nNextCloudPi \e[1m$( cat $VERFILE)\e[0m is up to date" fi