backup module script improvement
This commit is contained in:
parent
31482db136
commit
92d0f25480
1 changed files with 5 additions and 16 deletions
|
|
@ -71,23 +71,12 @@ in
|
|||
DST=$(mktemp --suffix=.tar)
|
||||
echo "Archiving and compressing $SRC to $DST."
|
||||
${cfg.compression.command}
|
||||
''
|
||||
+ (
|
||||
if cfg.encryption.command != null then
|
||||
/* bash */ ''
|
||||
|
||||
# Archive encryption (optionnal)
|
||||
SRC=$DST
|
||||
DST=$(mktemp --suffix=.tar.encrypted)
|
||||
echo "Encyphering $SRC to $DST."
|
||||
''
|
||||
+ cfg.encryption.command
|
||||
+ "
|
||||
"
|
||||
else
|
||||
""
|
||||
)
|
||||
+ /* bash */ ''
|
||||
# Archive encryption (optionnal)
|
||||
SRC=$DST
|
||||
DST=$(mktemp --suffix=.tar.encrypted)
|
||||
echo "Encyphering $SRC to $DST."
|
||||
${cfg.encryption.command}
|
||||
|
||||
# Archive salvation
|
||||
SRC=$DST
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue