You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: snapraid-aio-script.sh
+4-14Lines changed: 4 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
######################
9
9
# CONFIG VARIABLES #
10
10
######################
11
-
SNAPSCRIPTVERSION="2.7.0.1-DEV4"
11
+
SNAPSCRIPTVERSION="2.7.0.1-DEV6"
12
12
13
13
# find the current path
14
14
CURRENT_DIR="$(dirname "${0}")"
@@ -129,7 +129,7 @@ function main(){
129
129
130
130
# Now run sync if conditions are met
131
131
if [ $DO_SYNC-eq 1 ];then
132
-
echo"SYNC is authorized."
132
+
echo"SYNC is authorized. [`date`]"
133
133
echo"###SnapRAID SYNC [`date`]"
134
134
mklog "INFO: SnapRAID SYNC Job started"
135
135
if [ $PREHASH-eq 1 ];then
@@ -263,8 +263,6 @@ function main(){
263
263
fi
264
264
fi
265
265
266
-
#clean_desc
267
-
268
266
exit 0;
269
267
}
270
268
@@ -358,7 +356,7 @@ function chk_updated(){
358
356
functionchk_sync_warn(){
359
357
if [ $SYNC_WARN_THRESHOLD-gt -1 ];then
360
358
if [ $SYNC_WARN_THRESHOLD-eq 0 ];then
361
-
echo"Forced sync is enabled. [`date`]"
359
+
echo"Forced sync is enabled."
362
360
mklog "INFO: Forced sync is enabled."
363
361
else
364
362
echo"Sync after threshold warning(s) is enabled."
@@ -374,7 +372,7 @@ function chk_sync_warn(){
374
372
DO_SYNC=1
375
373
else
376
374
# if there is at least one warn count, output a message and force a sync job. Do not need to remove warning marker here as it is automatically removed when the sync job is run by this script
377
-
echo"Number of threshold warning(s) ($SYNC_WARN_COUNT) has reached/exceeded threshold ($SYNC_WARN_THRESHOLD). Forcing a SYNC job to run. [`date`]"
375
+
echo"Number of threshold warning(s) ($SYNC_WARN_COUNT) has reached/exceeded threshold ($SYNC_WARN_THRESHOLD). Forcing a SYNC job to run."
378
376
mklog "INFO: Number of threshold warning(s) ($SYNC_WARN_COUNT) has reached/exceeded threshold ($SYNC_WARN_THRESHOLD). Forcing a SYNC job to run."
379
377
DO_SYNC=1
380
378
fi
@@ -426,14 +424,6 @@ function service_array_setup() {
426
424
fi
427
425
}
428
426
429
-
functionclean_desc(){
430
-
# Cleanup file descriptors
431
-
exec>&{out} 2>&{err}
432
-
433
-
# If interactive shell restore output
434
-
[[ $-==*i* ]] &&exec&>/dev/tty
435
-
}
436
-
437
427
functionprepare_mail() {
438
428
if [ $CHK_FAIL-eq 1 ];then
439
429
if [ $DEL_COUNT-ge$DEL_THRESHOLD-a$DO_SYNC-eq 0 ];then
0 commit comments