File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ export LOG_FILE
80
80
export DNS_MAX_RETRIES
81
81
82
82
# Global variables for statistics
83
- declare -i TOTAL_DOMAINS= 0
83
+ # declare -i TOTAL_DOMAINS=0
84
84
85
85
# Enable debugging
86
86
# exec 2>"${WORK_DIR}/debug.log"
@@ -147,7 +147,6 @@ release_lock() {
147
147
}
148
148
149
149
# Signal handling
150
- trap trap_cleanup EXIT
151
150
trap ' log "Script interrupted"; trap_cleanup' INT TERM
152
151
153
152
init_directories () {
@@ -340,7 +339,8 @@ trap_cleanup() {
340
339
}
341
340
342
341
save_state () {
343
- local temp_state=" ${STATE_DIR} /state_$( date +%s) .tmp"
342
+ local temp_state
343
+ temp_state=" ${STATE_DIR} /state_$( date +%s) .tmp"
344
344
local main_md5 special_md5
345
345
346
346
log " Saving state..."
@@ -1479,7 +1479,7 @@ check_updates_needed() {
1479
1479
log " WARNING: Failed to clean temporary files"
1480
1480
fi
1481
1481
1482
- return $(( update_needed == true ? 0 : 1 ))
1482
+ return $(( update_needed == 1 ? 0 : 1 ))
1483
1483
}
1484
1484
1485
1485
# Helper function to restore backups
@@ -1724,4 +1724,5 @@ if ! main "$@"; then
1724
1724
exit 1
1725
1725
fi
1726
1726
1727
+ trap_cleanup
1727
1728
exit 0
You can’t perform that action at this time.
0 commit comments