X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=FS%2FFS%2Fpart_export%2Fcardfortress.pm;h=154f979b0e173a0cbd49440c40b05cf8359e497b;hb=4f0250a76508176cdf5336c199c883a3912f5274;hp=4916a6ee03cd3e80f9adae6f48913b169781977a;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git diff --git a/FS/FS/part_export/cardfortress.pm b/FS/FS/part_export/cardfortress.pm index 4916a6ee0..154f979b0 100644 --- a/FS/FS/part_export/cardfortress.pm +++ b/FS/FS/part_export/cardfortress.pm @@ -28,6 +28,7 @@ sub _export_insert { my $ssh = Net::OpenSSH->new( $self->machine, default_stdin_fh => $def_in ); + #capture2 and return STDERR, its probably useful if there's a problem my $private_key = $ssh->capture( { 'stdin_data' => $svc_acct->_password. "\n" }, '/usr/local/bin/merchant_create', map $svc_acct->$_, qw( username finger ) @@ -56,9 +57,25 @@ sub _export_replace { } sub _export_delete { - #my( $self, $svc_x ) = (shift, shift); + my( $self, $svc_acct ) = (shift, shift); + + #well, we're just going to disable them for now, but there you go + + eval "use Net::OpenSSH;"; + return $@ if $@; + + open my $def_in, '<', '/dev/null' or die "unable to open /dev/null"; + my $ssh = Net::OpenSSH->new( $self->machine, + default_stdin_fh => $def_in ); + + #capture2 and return STDERR, its probably useful if there's a problem + my $unused_output = $ssh->capture( + '/usr/local/bin/merchant_disable', map $svc_acct->$_, qw( username ) + ); + return $ssh->error if $ssh->error; + + ''; - return 'deletion not yet supproted'; } 1;