diff --git a/ceph/ceph.backup.deb.files.sh b/ceph/ceph.backup.deb.files.sh index 66eaf71..e912f13 100755 --- a/ceph/ceph.backup.deb.files.sh +++ b/ceph/ceph.backup.deb.files.sh @@ -33,10 +33,10 @@ if [ "$(command -v ceph)" ]; then ## Download deb files of all ceph related packages installed on the system printf '%b\n' "Download deb files of all ceph related packages installed on the system." - apt download -- $(dpkg -l | awk -v pattern="${CEPH_DEB_PKG_PATTERN}" '$0~pattern {print $2"="$3}') + apt download -- $(dpkg -l | awk -v pattern="${CEPH_DEB_PKG_PATTERN}" '$0~pattern {print $2"="$3}') || exit 3 printf '%b\n' "Backup Ceph deb files in version : ${CEPH_VERSION}" - tar cf "${BKP_TAR_PATH}" ./*.deb > /dev/null 2>&1 + tar cf "${BKP_TAR_PATH}" ./*.deb > /dev/null 2>&1 || exit 4 ## Remove deb files rm -rf -- *.deb