Add check for successfull unpack

This commit is contained in:
Antonio Calanducci 2024-07-16 08:47:59 +00:00
parent 12eb408429
commit ec7f9e20bd
1 changed files with 6 additions and 2 deletions

View File

@ -15,8 +15,12 @@ cd /mnt/beacon_data
echo "Unpacking the data"
tar -I zstd -xvf *.tar.zst
echo "Deleting the tar.zst"
rm *.tar.zst
if [ $? -eq 0 ]; then
echo "Deleting the tar.zst"
rm *.tar.zst
else
echo "Tar command failed. Not deleting the tar.zst file."
fi
if [ -n "$DEBUG" ]; then