168 |
; |
; |
169 |
} |
} |
170 |
|
|
171 |
if ( $name->can('start_options') ) { |
if ( $name->can('start_fork') ) { |
172 |
$html .= qq| <a href=/kvm/$_>$_</a>| foreach $name->start_options; |
$html .= qq| <a href=/start_stop/kvm/$_>$_</a>| foreach $name->start_fork; |
173 |
|
} |
174 |
|
|
175 |
|
if ( $name->can('actions') ) { |
176 |
|
$html .= qq| <a href=/action/kvm/$_>$_</a>| foreach $name->actions; |
177 |
} |
} |
178 |
} |
} |
179 |
|
|
201 |
warn $@ if $@; |
warn $@ if $@; |
202 |
print $client $redirect, qq|<big>$1 = $2</big><br>Location: <a href="$url">$url</a>|; |
print $client $redirect, qq|<big>$1 = $2</big><br>Location: <a href="$url">$url</a>|; |
203 |
server::debug( $debug ) if $1 eq 'debug'; |
server::debug( $debug ) if $1 eq 'debug'; |
204 |
} elsif ( $path =~ m{^/((?:screen|kvm).*)} ) { |
} elsif ( $path =~ m{^/start_stop/((?:screen|kvm).*)} ) { |
205 |
print $client $redirect, start_stop($1); |
print $client $redirect, start_stop($1); |
206 |
|
} elsif ( $path =~ m{^/action/([^/]+)/(.+)} ) { |
207 |
|
$1->$2(); |
208 |
|
print $client $redirect; |
209 |
} elsif ( $path =~ m{^/kill/static/(\d+)} ) { |
} elsif ( $path =~ m{^/kill/static/(\d+)} ) { |
210 |
print $client $redirect; |
print $client $redirect; |
211 |
kill 1, $1 || kill 9, $2 && warn "killed $1"; |
kill 1, $1 || kill 9, $2 && warn "killed $1"; |