--- lib/PXElator/httpd.pm 2009/07/31 17:41:19 86
+++ lib/PXElator/httpd.pm 2009/07/31 18:16:14 88
@@ -150,7 +150,7 @@
my $debug_proc;
warn 'pids: ', dump( $pids ) if $debug;
- foreach my $name ( keys %$pids ) {
+ foreach my $name ( sort keys %$pids ) {
my $pid = $pids->{$name} || next;
my $html = qq|$pid|;
@@ -168,8 +168,12 @@
;
}
- if ( $name->can('start_options') ) {
- $html .= qq| $_| foreach $name->start_options;
+ if ( $name->can('start_fork') ) {
+ $html .= qq| $_| foreach $name->start_fork;
+ }
+
+ if ( $name->can('actions') ) {
+ $html .= qq| $_| foreach $name->actions;
}
}
@@ -197,8 +201,11 @@
warn $@ if $@;
print $client $redirect, qq|$1 = $2
Location: $url|;
server::debug( $debug ) if $1 eq 'debug';
- } elsif ( $path =~ m{^/((?:screen|kvm).*)} ) {
+ } elsif ( $path =~ m{^/start_stop/((?:screen|kvm).*)} ) {
print $client $redirect, start_stop($1);
+ } elsif ( $path =~ m{^/action/([^/]+)/(.+)} ) {
+ $1->$2();
+ print $client $redirect;
} elsif ( $path =~ m{^/kill/static/(\d+)} ) {
print $client $redirect;
kill 1, $1 || kill 9, $2 && warn "killed $1";