X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export%2Fforward_shellcommands.pm;h=fe304350c86a465222ffd1687b48c64e5830da25;hb=f11341c6ca588f1ff5e46a857540e88d49d7647a;hp=f6fcb60629f359c7053430d157b153b1502b5b78;hpb=c550b6ea1846f933dd130fc690777ad89f55012d;p=freeside.git diff --git a/FS/FS/part_export/forward_shellcommands.pm b/FS/FS/part_export/forward_shellcommands.pm index f6fcb6062..fe304350c 100644 --- a/FS/FS/part_export/forward_shellcommands.pm +++ b/FS/FS/part_export/forward_shellcommands.pm @@ -1,11 +1,58 @@ package FS::part_export::forward_shellcommands; use strict; -use vars qw(@ISA); +use vars qw(@ISA %info); +use Tie::IxHash; use FS::part_export; @ISA = qw(FS::part_export); +tie my %options, 'Tie::IxHash', + 'user' => { label=>'Remote username', default=>'root' }, + 'useradd' => { label=>'Insert command', + default=>'', + }, + 'userdel' => { label=>'Delete command', + default=>'', + }, + 'usermod' => { label=>'Modify command', + default=>'', + }, +; + +%info = ( + 'svc' => 'svc_forward', + 'desc' => 'Run remote commands via SSH, for forwards', + 'options' => \%options, + 'notes' => <<'END' +Run remote commands via SSH, for forwards. You will need to +setup SSH for unattended operation. +

Use these buttons for some useful presets: + +The following variables are available for interpolation (prefixed with +new_ or old_ for replace operations): + +END +); + sub rebless { shift; } sub _export_insert { @@ -97,7 +144,7 @@ sub shellcommands_queue { } sub ssh_cmd { #subroutine, not method - use Net::SSH '0.07'; + use Net::SSH '0.08'; &Net::SSH::ssh_cmd( { @_ } ); } @@ -108,3 +155,5 @@ sub ssh_cmd { #subroutine, not method #sub shellcommands_delete { #subroutine, not method #} +1; +