File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 161161chmod 660 $HESTIA /data/firewall/ipset.conf
162162chmod 660 " ${IPSET_PATH} /${IPSET_FILE} .iplist"
163163
164+ # Install ipset daily cron updater
165+ if ! grep --no-messages " v-update-firewall-ipset" $HESTIA /data/queue/daily.pipe; then
166+ cmd=" $BIN /v-update-firewall-ipset yes"
167+ echo " $cmd " >> $HESTIA /data/queue/daily.pipe
168+ fi
169+
164170
165171# ----------------------------------------------------------#
166172# Hestia #
Original file line number Diff line number Diff line change @@ -41,9 +41,9 @@ for ipset_name in $(search_objects "$ipset_hstobject" 'SUSPENDED' 'no' 'LISTNAME
4141
4242 last_updated_ts=$( date -d " $ipset_date $ipset_time " +%s)
4343 now=$( date +%s)
44- hours_since_update=$(( (now - last_updated_ts) / 60 ))
44+ hours_since_update=$(( (now - last_updated_ts) / ( 60 * 60 ) ))
4545
46- if [[ " $hours_since_update " -lt 70 ]] && [ " $force " = ' no' ]; then
46+ if [[ " $hours_since_update " -lt 24 ]] && [ " $force " = ' no' ]; then
4747 # load existing ip list files in the kernel but don't auto update them
4848 $BIN /v-add-firewall-ipset " $ipset_name "
4949 continue
You can’t perform that action at this time.
0 commit comments