| Archer documentation | Contained in the Archer distribution. |
Archer::Plugin::Exec::Remote -
- module: Exec::Remote
config:
name: restart
user: root
command: "if [ -e /etc/init.d/apache ] ; then /etc/init.d/apache stop; sleep 6; /etc/init.d/apache start; fi"
type: app
should be use in 'process' phase?
use Net::SSH::Perl
| Archer documentation | Contained in the Archer distribution. |
package Archer::Plugin::Exec::Remote; use strict; use warnings; use base qw/Archer::Plugin::Exec/; sub _execute { my ($self, $cmd, $args) = @_; my $real_command = "ssh $self->{server} $cmd"; $real_command = "sudo -u $self->{config}->{user} $real_command" if $self->{config}->{user}; $self->log(debug => "real execute: $real_command"); system $real_command; # XXX security!!! } 1; __END__