No need for the if, just remove any files that match the pattern.
This commit is contained in:
@@ -18,10 +18,8 @@ time="`which time`"
|
|||||||
## Main ##
|
## Main ##
|
||||||
|
|
||||||
# Remove the last backup.
|
# Remove the last backup.
|
||||||
if [[ -e "$BASENAME"*"$TAG"* ]]; then
|
echo "`date` - Removing existing files."
|
||||||
echo "`date` - Removing existing file."
|
rm -fv "$BASENAME"*"$TAG"*
|
||||||
rm -fv "$BASENAME"*"$TAG"*
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "\n`date` - Take down services for a cold backup."
|
echo -e "\n`date` - Take down services for a cold backup."
|
||||||
manage.sh -d
|
manage.sh -d
|
||||||
|
Reference in New Issue
Block a user