use store::audit proxy all over the place
[pxelator] / lib / PXElator / ssh.pm
index 7895593..608be37 100644 (file)
@@ -7,7 +7,7 @@ use Net::OpenSSH;
 use English;
 use Data::Dump qw/dump/;
 use client;
-use CouchDB;
+use store;
 
 my $id = 3;
 my $id_rsa = '/root/.ssh/id_rsa';
@@ -70,7 +70,7 @@ sub shell {
                my ($out,$err) = $ssh->capture2( $command ) or die "$command ", $ssh->error;
                warn "$out\n$err";
 
-               CouchDB::audit( $ip, $command, { ip => $ip, command => $command, out => $out, err => $err } );
+               store::audit( $ip, $command, { ip => $ip, command => $command, out => $out, err => $err } );
 
                $html .= qq|<tt style="color: grey">root\@$ip:# <b>$command</b></tt><pre>$out</pre>|;
                $html .= qq|<pre style="color: red">$err</pre>| if $err;