| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/13386/root/usr/libexec/webmin/cfengine/ |
Upload File : |
#!/usr/bin/perl
# edit_cfd.cgi
# Display options for the cfengine daemon on this host
require './cfengine-lib.pl';
&ui_print_header(undef, $text{'cfd_title'}, "", "cfd");
if (!&has_command($config{'cfd'})) {
print &text('cfd_ecmd', "<tt>$config{'cfd'}</tt>",
"$gconfig{'webprefix'}/config.cgi?$module_name"),"<p>\n";
&ui_print_footer("/", $text{'index'});
exit;
}
# Display table of daemon options
$conf = &get_cfd_config();
@secs = grep { $_->{'type'} eq 'section' } @$conf;
&show_classes_table(\@secs, 1);
# Allow starting or stopping of cfd
($pid) = &find_byname("cfd");
print &ui_hr();
print "<table width=100%><tr>\n";
if ($pid) {
print "<form action=stop.cgi>\n";
print "<td><input type=submit value='$text{'cfd_stop'}'></td>\n";
print "<td>$text{'cfd_stopdesc'}</td>\n";
print "</form>\n";
}
else {
print "<form action=start.cgi>\n";
print "<td><input type=submit value='$text{'cfd_start'}'></td>\n";
print "<td>$text{'cfd_startdesc'}</td>\n";
print "</form>\n";
}
print "</tr></table>\n";
&ui_print_footer("", $text{'index_return'});