Skip to content

Commit 9074f6f

Browse files
committed
abort restore_backup if no backup file
1 parent 342fef5 commit 9074f6f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

mytonctrl/scripts/restore_backup.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ do
1616
esac
1717
done
1818

19+
if [ ! -f "$name" ]; then
20+
echo "Backup file not found, aborting."
21+
exit 1
22+
fi
1923

2024
COLOR='\033[92m'
2125
ENDC='\033[0m'

0 commit comments

Comments
 (0)