diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-01-19 04:42:41 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-01-19 04:42:41 -0800 |
commit | bdb82505541105352ceeefb63aab40df7f25dc45 (patch) | |
tree | 9df44ea1300934e990d95f0e54bb8b84186b2c7f | |
parent | b4aea58e0d04ff1930397e0f96ecdc50748b748b (diff) |
cardfortress merchant deletion (disabling)
-rw-r--r-- | FS/FS/part_export/cardfortress.pm | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/FS/FS/part_export/cardfortress.pm b/FS/FS/part_export/cardfortress.pm index 4916a6ee0..68a1aea4e 100644 --- a/FS/FS/part_export/cardfortress.pm +++ b/FS/FS/part_export/cardfortress.pm @@ -58,7 +58,22 @@ sub _export_replace { sub _export_delete { #my( $self, $svc_x ) = (shift, shift); - return 'deletion not yet supproted'; + #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 ); + + my $private_key = $ssh->run( + '/usr/local/bin/merchant_disable', map $svc_acct->$_, qw( username ) + ); + return $ssh->error if $ssh->error; + + ''; + } 1; |