Skip to content

Commit 8626517

Browse files
committed
Update resources
1 parent 423327e commit 8626517

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

app.backup_fs.sh

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -169,22 +169,22 @@ function _rsync() {
169169
function 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

181181
function 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

190190
function fs_backup() {
@@ -211,13 +211,18 @@ function fs_backup() {
211211
function 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

223228
function fs_clean() {

0 commit comments

Comments
 (0)