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)
|
DST=$(mktemp --suffix=.tar)
|
||||||
echo "Archiving and compressing $SRC to $DST."
|
echo "Archiving and compressing $SRC to $DST."
|
||||||
${cfg.compression.command}
|
${cfg.compression.command}
|
||||||
''
|
|
||||||
+ (
|
|
||||||
if cfg.encryption.command != null then
|
|
||||||
/* bash */ ''
|
|
||||||
|
|
||||||
# Archive encryption (optionnal)
|
# Archive encryption (optionnal)
|
||||||
SRC=$DST
|
SRC=$DST
|
||||||
DST=$(mktemp --suffix=.tar.encrypted)
|
DST=$(mktemp --suffix=.tar.encrypted)
|
||||||
echo "Encyphering $SRC to $DST."
|
echo "Encyphering $SRC to $DST."
|
||||||
''
|
${cfg.encryption.command}
|
||||||
+ cfg.encryption.command
|
|
||||||
+ "
|
|
||||||
"
|
|
||||||
else
|
|
||||||
""
|
|
||||||
)
|
|
||||||
+ /* bash */ ''
|
|
||||||
|
|
||||||
# Archive salvation
|
# Archive salvation
|
||||||
SRC=$DST
|
SRC=$DST
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue