[FIXED] Se cambia la lógica para que copie todo el contenido de la carpeta /home/mrosero/.gnugp
This commit is contained in:
parent
291799be6f
commit
ce31c75cf9
2 changed files with 11 additions and 8 deletions
|
@ -82,7 +82,7 @@ fi
|
|||
dialog_yesno "${gpmsg_105}"
|
||||
case ${result} in
|
||||
0)
|
||||
gpg_backup "$DB_GPG_PATH/$DB_GPG_FILE" "$BIN_HOME/$GPG_CONFIG_PATH" "$DATEBAK"
|
||||
gpg_backup "$DB_GPG_PATH/$DB_GPG_FILE" "$BIN_HOME/$GPG_CONFIG_PATH" "$DATEBAK" "$GPG_DEFAULT_PATH"
|
||||
rc=$?
|
||||
case $rc in
|
||||
0)
|
||||
|
|
|
@ -103,6 +103,7 @@ function gpg_backup() {
|
|||
local DB_BACKUP=$1
|
||||
local BIN_CONFIG=$2
|
||||
local TIMESTAMP=$3
|
||||
local GNUGP_PATH=$4
|
||||
local rc=0
|
||||
|
||||
# Check if backup configuration file exists
|
||||
|
@ -157,13 +158,15 @@ function gpg_backup() {
|
|||
fi
|
||||
|
||||
# Copiar los archivos de revocación
|
||||
local REVOKE_PATH="${GNUPGHOME:-$GPG_DEFAULT_PATH}/openpgp-revocs.d"
|
||||
cp -rf "${REVOKE_PATH}"/${GPG_REVOKE_FILES} "${TMP_PATH}/"
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]
|
||||
then
|
||||
rm -rf "${TMP_PATH}"
|
||||
return $rc
|
||||
mkdir ${TMP_PATH}/gnugp
|
||||
if [ $? -eq 0 ]; then
|
||||
cp -rf $GNUGP_PATH/* ${TMP_PATH}/gnugp
|
||||
rc=$?
|
||||
if [ $rc -ne 0 ]
|
||||
then
|
||||
rm -rf "${TMP_PATH}"
|
||||
return $rc
|
||||
fi
|
||||
fi
|
||||
|
||||
# Cambiar el directorio de trabajo a la carpeta temporal para poder hacer el empaquetamiento zip
|
||||
|
|
Loading…
Reference in a new issue