fix possible double-backslash on outputLocation
This commit is contained in:
parent
85b02e8821
commit
8126efc7e1
@ -380,7 +380,7 @@ if [ -d "$outputLocation" ]; then
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# create directory
|
# create directory
|
||||||
if ! mkdir -p "$outputLocation" > /dev/null 2>&1; then
|
if ! mkdir -p "${outputLocation%/}" > /dev/null 2>&1; then
|
||||||
exitError '1' "Unable to create output path: $outputLocation" 'nc'
|
exitError '1' "Unable to create output path: $outputLocation" 'nc'
|
||||||
else
|
else
|
||||||
logInfo "Writing output to: $outputLocation"
|
logInfo "Writing output to: $outputLocation"
|
||||||
@ -560,7 +560,7 @@ elif [ $extract = 'false' ]; then
|
|||||||
exitError 6 'Unable to copy backup archive from container to host.'
|
exitError 6 'Unable to copy backup archive from container to host.'
|
||||||
fi
|
fi
|
||||||
logInfo 'done'
|
logInfo 'done'
|
||||||
logInfo "Backup file: $outputLocation/ldap-${fileDate}.tar.gz"
|
logInfo "Backup file: ${outputLocation%/}/ldap-${fileDate}.tar.gz"
|
||||||
|
|
||||||
## cleanup and log success
|
## cleanup and log success
|
||||||
cleanup
|
cleanup
|
||||||
|
Loading…
Reference in New Issue
Block a user