File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Fast update of IP set for ipset.
88## Usage
99
1010``` bash
11- ipset-fast-update 1.5.0
11+ ipset-fast-update 1.5.1
1212
1313Usage:
1414 ipset-fast-update -n SET_NAME [-i PATH]... [-u URL]... [-e EXCLUDE_PATH]... [OPTIONS...]
Original file line number Diff line number Diff line change 1313
1414set -euo pipefail
1515
16- VERSION=" 1.5.0 "
16+ VERSION=" 1.5.1 "
1717
1818ALERT_THRESHOLD_RATIO=" 80"
1919IS_TEMPORARY=" 0"
@@ -334,11 +334,13 @@ main() {
334334 fi
335335
336336 if [[ " ${IPSET_SAVE_ON_STOP} " != " yes" ]]; then
337- echo " --------------------------------------------------------------------------------------"
338- echo " [WARNING]: IPSET_SAVE_ON_STOP in ${IPSET_CONFIG} is not set to yes."
339- echo " It is recommended that you set it to 'yes' for the setting to take effect permanently."
340- echo " If you do not want to save the configuration automatically, use the -t option."
341- echo " --------------------------------------------------------------------------------------"
337+ cat << _EOF_
338+ --------------------------------------------------------------------------------------
339+ [WARNING]: IPSET_SAVE_ON_STOP in ${IPSET_CONFIG} is not set to yes.
340+ It is recommended that you set it to 'yes' for the setting to take effect permanently.
341+ If you do not want to save the configuration automatically, use the -t option.
342+ --------------------------------------------------------------------------------------
343+ _EOF_
342344 fi
343345 /usr/libexec/ipset/ipset.start-stop save
344346 fi
@@ -348,7 +350,7 @@ main() {
348350 [[ " ${IS_VERBOSE} " -eq 1 ]] && echo " # Check set: ipset list -t ${SET_NAME} , ipset list ${SET_NAME} "
349351
350352 # Save current list file
351- yes | mv " ${LIST_FILE} " " ${LIST_CURRENT_FILE} "
353+ cat " ${LIST_FILE} " > " ${LIST_CURRENT_FILE} "
352354}
353355
354356[[ ${# BASH_SOURCE[@]} = 1 ]] && main " $@ "
You can’t perform that action at this time.
0 commit comments