File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -169,22 +169,22 @@ function _rsync() {
169169function fs_mount() {
170170 (( ! "${SSH_ON} " )) && return 0
171171
172- local msg ; msg =(
172+ local msg_e ; msg_e =(
173173 ' error'
174174 ' Error mounting SSH FS!'
175175 " Error mounting SSH FS to '${SSH_MNT} '!"
176176 )
177177
178- _ssh " ${SSH_DST} " " ${SSH_MNT} " || _msg " ${msg [@]} "
178+ _ssh " ${SSH_DST} " " ${SSH_MNT} " || _msg " ${msg_e [@]} "
179179}
180180
181181function fs_check() {
182182 local file; file=" ${FS_DST} /.backup_fs" ; [[ -f " ${file} " ]] && return 0
183- local msg ; msg =(
183+ local msg_e ; msg_e =(
184184 ' error'
185185 " File '${file} ' not found!"
186186 " File '${file} ' not found! Please check the remote storage status!"
187- ); _msg " ${msg [@]} "
187+ ); _msg " ${msg_e [@]} "
188188}
189189
190190function fs_backup() {
@@ -211,13 +211,18 @@ function fs_backup() {
211211function fs_sync() {
212212 (( ! "${RSYNC_ON} " )) && return 0
213213
214- local msg ; msg =(
214+ local msg_e ; msg_e =(
215215 ' error'
216216 ' Error synchronizing with remote storage'
217217 ' Error synchronizing with remote storage!'
218218 )
219+ local msg_s; msg_s=(
220+ ' success'
221+ ' Synchronization with remote storage completed successfully'
222+ ' Synchronization with remote storage completed successfully.'
223+ )
219224
220- _rsync " ${FS_DST} " " ${RSYNC_DST} " || _msg " ${msg [@]} "
225+ { _rsync " ${FS_DST} " " ${RSYNC_DST} " && _msg " ${msg_s[@]} " ; } || _msg " ${msg_e [@]} "
221226}
222227
223228function fs_clean() {
You can’t perform that action at this time.
0 commit comments