UI for editing max process lifetime

This commit is contained in:
Jamie Cameron
2022-04-10 19:43:13 -07:00
parent 7fbc37709b
commit 86f26e2fd3
3 changed files with 18 additions and 0 deletions

View File

@@ -122,6 +122,14 @@ else {
&error($text{'bind_emaxconns_per_net'});
$miniserv{'maxconns_per_net'} = $in{'maxconns_per_net'};
}
if ($in{'maxlifetime_def'}) {
delete($miniserv{'maxlifetime'});
}
else {
$in{'maxlifetime'} =~ /^\d+$/ && $in{'maxlifetime'} > 60 ||
&error($text{'bind_emaxlifetime'});
$miniserv{'maxlifetime'} = $in{'maxlifetime'};
}
&put_miniserv_config(\%miniserv);
&unlock_file($ENV{'MINISERV_CONFIG'});

View File

@@ -76,6 +76,12 @@ print &ui_table_row($text{'bind_maxconns_per_net'},
&ui_opt_textbox("maxconns_per_net", $miniserv{'maxconns_per_net'}, 5,
$text{'default'}." (35)"));
# Max subprocess lifetime
print &ui_table_row($text{'bind_maxlifetime'},
&ui_opt_textbox("maxlifetime", $miniserv{'maxlifetime'}, 5,
$text{'bind_maxlifetime_def'})." ".
$text{'bind_maxlifetime_secs'});
print &ui_table_end();
print &ui_form_end([ [ "save", $text{'save'} ] ]);

View File

@@ -69,6 +69,10 @@ bind_maxconns_per_net=Maximum concurrent connections per network
bind_emaxconns=Maximum concurrent connections must be a number greater than 1
bind_emaxconns_per_ip=Maximum concurrent connections per IP must be a number greater than 1
bind_emaxconns_per_net=Maximum concurrent connections per network must be a number greater than 1
bind_maxlifetime=Maximum Webmin process lifetime
bind_maxlifetime_def=Unlimited
bind_maxlifetime_secs=seconds
bind_emaxlifetime=Maximum process lifetime must be a number greater than 60 seconds
log_title=Logging
log_desc=Webmin can be configured to write a log of web server hits, in the standard CLF log file format. If logging is enabled, you can also choose whether IP addresses or hostnames are recorded, and how often the log file is cleared. When enabled, logs are written to the file $1.