From cd612ae55584cc8ad761aad6041c1405c20da278 Mon Sep 17 00:00:00 2001 From: Christian Rotzoll Date: Sun, 17 Mar 2019 00:24:06 +0100 Subject: [PATCH] remove error output --- home.admin/config.scripts/lnd.rescue.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/home.admin/config.scripts/lnd.rescue.sh b/home.admin/config.scripts/lnd.rescue.sh index 1f9ba4a..5b625ac 100755 --- a/home.admin/config.scripts/lnd.rescue.sh +++ b/home.admin/config.scripts/lnd.rescue.sh @@ -62,7 +62,7 @@ elif [ ${mode} = "restore" ]; then filename="" while [ ${#filename} -eq 0 ] do - countZips=$(sudo ls /home/admin/lnd-rescue-*.tar.gz | grep -c 'lnd-rescue') + countZips=$(sudo ls /home/admin/lnd-rescue-*.tar.gz 2>/dev/null | grep -c 'lnd-rescue') if [ ${countZips} -lt 1 ]; then echo "**************************" echo "* UPLOAD THE BACKUP FILE *" @@ -83,7 +83,8 @@ elif [ ${mode} = "restore" ]; then if [ ${countZips} -gt 1 ]; then echo "!! WARNING !!" echo "There are multiple lnd-rescue files in directory /home/admin." - echo "Make sure there is only one to workd with and start again." + echo "Make sure there is only one file to work with and start again." + echo exit 1 fi if [ ${countZips} -eq 1 ]; then