Compare commits

..

1 Commits

Author SHA1 Message Date
itdoginfo
86038e2756 Delay setting option 2025-09-02 14:09:35 +03:00
5 changed files with 58 additions and 3 deletions

View File

@@ -198,6 +198,18 @@ function createAdditionalSection(mainSection, network) {
return ['lan', 'loopback'].indexOf(value) === -1 && !value.startsWith('@');
};
o = mainSection.taboption('additional', form.Value, 'procd_reload_delay', _('Interface Monitoring Delay'), _('Delay in milliseconds before reloading podkop after interface UP'));
o.ucisection = 'main';
o.depends('mon_restart_ifaces', '1');
o.default = '2000';
o.rmempty = false;
o.validate = function (section_id, value) {
if (!value) {
return _('Delay value cannot be empty');
}
return true;
};
o = mainSection.taboption('additional', form.Flag, 'dont_touch_dhcp', _('Dont touch my DHCP!'), _('Podkop will not change the DHCP config'));
o.default = '0';
o.rmempty = false;

View File

@@ -875,4 +875,25 @@ msgid "Lists update failed"
msgstr "Обновление списков не удалось"
msgid "Error: "
msgstr "Ошибка: "
msgstr "Ошибка: "
msgid "Interface monitoring"
msgstr "Мониторинг интерфейсов"
msgid "Interface monitoring for bad WAN"
msgstr "Мониторинг интерфейсов для плохого WAN"
msgid "Interface for monitoring"
msgstr "Интерфейс для мониторинга"
msgid "Select the WAN interfaces to be monitored"
msgstr "Выберите WAN интерфейсы для мониторинга"
msgid "Interface Monitoring Delay"
msgstr "Задержка при мониторинге интерфейсов"
msgid "Delay in milliseconds before reloading podkop after interface UP"
msgstr "Задержка в миллисекундах перед перезагрузкой podkop после поднятия интерфейса"
msgid "Delay value cannot be empty"
msgstr "Значение не может быть пустым"

View File

@@ -1229,4 +1229,25 @@ msgid "Loading..."
msgstr ""
msgid "Error: "
msgstr ""
msgid "Interface monitoring"
msgstr ""
msgid "Interface monitoring for bad WAN"
msgstr ""
msgid "Interface for monitoring"
msgstr ""
msgid "Select the WAN interfaces to be monitored"
msgstr ""
msgid "Interface Monitoring Delay"
msgstr ""
msgid "Delay in milliseconds before reloading podkop after interface UP"
msgstr ""
msgid "Delay value cannot be empty"
msgstr ""

View File

@@ -39,5 +39,6 @@ config main 'main'
list iface 'br-lan'
option mon_restart_ifaces '0'
#list restart_ifaces 'wan'
option procd_reload_delay '2000'
option ss_uot '0'
option detour '0'

View File

@@ -34,9 +34,9 @@ service_triggers() {
config_get mon_restart_ifaces "main" "mon_restart_ifaces"
config_get restart_ifaces "main" "restart_ifaces"
config_get procd_reload_delay "main" "procd_reload_delay" "2000"
# Test without delay
#PROCD_RELOAD_DELAY=2000
PROCD_RELOAD_DELAY=$procd_reload_delay
procd_open_trigger
procd_add_config_trigger "config.change" "$NAME" "$initscript" restart 'on_config_change'