Fix procd sing-box termination timeout, watchdog backup dir creation, and telegram retry log levels

This commit is contained in:
Dushnilin
2026-08-12 13:09:05 +03:00
parent e1a0f04e4a
commit d527b86d4c
5 changed files with 10 additions and 1 deletions
@@ -884,6 +884,7 @@ function managed_sing_box_service_text() {
" procd_set_param stderr \"$log_stderr\"\n" +
" procd_set_param limits core=\"unlimited\"\n" +
" procd_set_param limits nofile=\"1000000 1000000\"\n" +
" procd_set_param term_timeout 15\n" +
" procd_set_param respawn\n" +
" procd_close_instance\n" +
"}\n\n" +
@@ -1946,6 +1946,7 @@ function managed_sing_box_service_script(marker) {
" procd_set_param stderr \"$log_stderr\"\n" +
" procd_set_param limits core=\"unlimited\"\n" +
" procd_set_param limits nofile=\"1000000 1000000\"\n" +
" procd_set_param term_timeout 15\n" +
" procd_set_param respawn\n" +
" procd_close_instance\n" +
"}\n" +
+2 -1
View File
@@ -2670,7 +2670,8 @@ function worker() {
consecutive_failures++;
let backoff = poll_interval * (1 << min(consecutive_failures - 1, 4));
if (backoff > 300) backoff = 300;
command_success_from_args(["logger", "-t", "tachyon-telegram", "[warn] API failure " + as_string(consecutive_failures) + ", backing off " + as_string(backoff) + "s"]);
let log_level = consecutive_failures >= 3 ? "[warn]" : "[info]";
command_success_from_args(["logger", "-t", "tachyon-telegram", log_level + " API poll retry " + as_string(consecutive_failures) + ", backing off " + as_string(backoff) + "s"]);
sleep(backoff * 1000);
continue;
}
@@ -103,6 +103,11 @@ function write_state_file(path, value, description) {
path = as_string(path);
let ok = false;
let parent_m = match(path, /^(.+)\/[^\/]+$/);
if (parent_m && parent_m[1] != "") {
try { fs.mkdir(parent_m[1]); } catch (e) {}
}
try {
ok = fs.writefile(path, as_string(value)) != null;
}
+1
View File
@@ -466,6 +466,7 @@ function managed_service_text() {
" procd_set_param stderr \"$log_stderr\"\n" +
" procd_set_param limits core=\"unlimited\"\n" +
" procd_set_param limits nofile=\"1000000 1000000\"\n" +
" procd_set_param term_timeout 15\n" +
" procd_set_param respawn\n" +
" procd_close_instance\n" +
"}\n\n" +