fix incorrect form of its
This commit is contained in:
parent
edba57caaf
commit
c9adb535b2
@ -27,7 +27,7 @@ scriptPath="$( CDPATH='' cd -- "$( dirname -- "$0" )" && pwd -P )"
|
|||||||
scriptName="$( basename "$0" )"
|
scriptName="$( basename "$0" )"
|
||||||
# logfile default: same location and name as this script, with '.log' extension
|
# logfile default: same location and name as this script, with '.log' extension
|
||||||
logfile="$scriptPath/${scriptName%.*}.log"
|
logfile="$scriptPath/${scriptName%.*}.log"
|
||||||
# encryption parameters file default: same location and name as this script,
|
# encryption parameters file default: same location and name as this script,
|
||||||
# with '.params' extension
|
# with '.params' extension
|
||||||
encParams="$scriptPath/${scriptName%.*}.params"
|
encParams="$scriptPath/${scriptName%.*}.params"
|
||||||
# backup mode by default
|
# backup mode by default
|
||||||
@ -63,11 +63,11 @@ consoleError () {
|
|||||||
exit "$1"
|
exit "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
decryptionNote () {
|
decryptionNote () {
|
||||||
printf "\n"
|
printf "\n"
|
||||||
textblock "${bold}${magenta}Decrypting your backup archive:${norm}"
|
textblock "${bold}${magenta}Decrypting your backup archive:${norm}"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
||||||
textblock 'To decrypt and extract your backup file, you need the following information:'
|
textblock 'To decrypt and extract your backup file, you need the following information:'
|
||||||
textblock '1. The password used to encrypt the file'
|
textblock '1. The password used to encrypt the file'
|
||||||
textblock '2. The encryption cipher used (default: AES-256-CBC)'
|
textblock '2. The encryption cipher used (default: AES-256-CBC)'
|
||||||
@ -132,7 +132,7 @@ scriptHelp () {
|
|||||||
textblock "${bold}${magenta}Usage: ${scriptName} [parameters]${norm}"
|
textblock "${bold}${magenta}Usage: ${scriptName} [parameters]${norm}"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
textblock "${cyan}Parameters ${yellow}(default value):${norm}"
|
textblock "${cyan}Parameters ${yellow}(default value):${norm}"
|
||||||
textblock "There are NO mandatory parameters. By default the script will run in 'backup' mode and save an encrypted backup archive to the current directory. If a parameter is not supplied, it's default value will be used. In the case of a switch parameter, it will remain deactivated if not specified."
|
textblock "There are NO mandatory parameters. By default the script will run in 'backup' mode and save an encrypted backup archive to the current directory. If a parameter is not supplied, its default value will be used. In the case of a switch parameter, it will remain deactivated if not specified."
|
||||||
printf "\n"
|
printf "\n"
|
||||||
textblock "${bold}*** Common parameters ***${norm}"
|
textblock "${bold}*** Common parameters ***${norm}"
|
||||||
printf "\n"
|
printf "\n"
|
||||||
@ -401,7 +401,7 @@ else
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
logInfo "Imported: '$encParams'"
|
logInfo "Imported: '$encParams'"
|
||||||
|
|
||||||
# verify import
|
# verify import
|
||||||
logInfo 'task' 'Verify encryption password'
|
logInfo 'task' 'Verify encryption password'
|
||||||
if [ -z "$password" ]; then
|
if [ -z "$password" ]; then
|
||||||
@ -435,7 +435,7 @@ if [ $extract = 'true' ]; then
|
|||||||
|
|
||||||
# extract backupFile to outputLocation
|
# extract backupFile to outputLocation
|
||||||
logInfo "Extracting backup file ($backupFile)"
|
logInfo "Extracting backup file ($backupFile)"
|
||||||
|
|
||||||
# create extraction target directory
|
# create extraction target directory
|
||||||
if [ ! -d "${outputLocation%/}/restore" ]; then
|
if [ ! -d "${outputLocation%/}/restore" ]; then
|
||||||
# create subdirectory for restored files
|
# create subdirectory for restored files
|
||||||
@ -537,7 +537,7 @@ elif [ $extract = 'false' ]; then
|
|||||||
else
|
else
|
||||||
logInfo 'done'
|
logInfo 'done'
|
||||||
fi
|
fi
|
||||||
i=$((i+1))
|
i=$((i+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
# compress and encrypt exported ldif files
|
# compress and encrypt exported ldif files
|
||||||
|
Loading…
Reference in New Issue
Block a user