Skip to content

Commit f1debd0

Browse files
zxlhhycccpymumu
authored andcommitted
Add update weekly or daily
At present, it is only updated daily, and under normal circumstances, the data updated daily is not large, so the addition can be updated weekly or daily.
1 parent 73c96cf commit f1debd0

File tree

1 file changed

+3
-2
lines changed
  • package/openwrt/files/etc/init.d

1 file changed

+3
-2
lines changed

Diff for: package/openwrt/files/etc/init.d/smartdns

+3-2
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,13 @@ disable_auto_update()
260260

261261
enable_auto_update()
262262
{
263-
grep "0 $auto_update_day_time * * * /etc/init.d/smartdns updatefiles" /etc/crontabs/root 2>/dev/null
263+
grep "0 $auto_update_day_time * * $auto_update_week_time /etc/init.d/smartdns updatefiles" /etc/crontabs/root 2>/dev/null
264264
if [ $? -eq 0 ]; then
265265
return
266266
fi
267267

268268
disable_auto_update 1
269-
echo "0 $auto_update_day_time * * * /etc/init.d/smartdns updatefiles" >> /etc/crontabs/root
269+
echo "0 $auto_update_day_time * * $auto_update_week_time /etc/init.d/smartdns updatefiles" >> /etc/crontabs/root
270270
restart_crond
271271
}
272272

@@ -501,6 +501,7 @@ load_service()
501501
config_get tcp_server "$section" "tcp_server" "1"
502502
config_get server_flags "$section" "server_flags" ""
503503

504+
config_get auto_update_week_time "$section" "auto_update_week_time" "*"
504505
config_get auto_update_day_time "$section" "auto_update_day_time" "5"
505506

506507
config_get speed_check_mode "$section" "speed_check_mode" ""

0 commit comments

Comments
 (0)