File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -191,15 +191,21 @@ function fs_backup() {
191191 local ts; ts=" $( date -u ' +%m.%d-%H' ) "
192192 local dst; dst=" ${FS_DST} /${FS_TPL} "
193193 local file; file=" $( hostname -f ) .${ts} .tar.xz"
194- local msg ; msg =(
194+ local msg_e ; msg_e =(
195195 ' error'
196196 " Error backing up files ('${file} ')"
197197 " Error backing up files ('${file} ')! File '${dst} /${file} ' not received or corrupted!"
198198 )
199+ local msg_s; msg_s=(
200+ ' success'
201+ " Backup of files ('${file} ') completed successfully"
202+ " Backup of files ('${file} ') completed successfully. File '${dst} /${file} ' received."
203+ )
199204
200205 for i in " ${! FS_SRC[@]} " ; do [[ -e " ${FS_SRC[i]} " ]] || unset ' FS_SRC[i]' ; done
201206 [[ ! -d " ${dst} " ]] && mkdir -p " ${dst} " ; cd " ${dst} " || _error " Directory '${dst} ' not found!"
202- { { tar -cf - " ${FS_SRC[@]} " | xz | _enc " ${dst} /${file} " ; } && _sum " ${dst} /${file} " ; } || _msg " ${msg[@]} "
207+ { { { tar -cf - " ${FS_SRC[@]} " | xz | _enc " ${dst} /${file} " ; } && _sum " ${dst} /${file} " ; } && _msg " ${msg_s[@]} " ; } \
208+ || _msg " ${msg_e[@]} "
203209}
204210
205211function fs_sync() {
You can’t perform that action at this time.
0 commit comments