Handle hostnames with upper-case letters
[webmin.git] / status / exec-monitor.pl
1 # exec-monitor.pl
2 # Check if some command exits with non-zero status
3
4 sub get_exec_status
5 {
6 system("($_[0]->{'cmd'}) >/dev/null 2>&1 </dev/null");
7 return { 'up' => $?==0 ? 1 : 0 };
8 }
9
10 sub show_exec_dialog
11 {
12 print &ui_table_row($text{'exec_cmd'},
13         &ui_textbox("cmd", $_[0]->{'cmd'}, 50), 3);
14 }
15
16 sub parse_exec_dialog
17 {
18 $in{'cmd'} || &error($text{'exec_ecmd'});
19 $_[0]->{'cmd'} = $in{'cmd'};
20 }
21