IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38181


Ignore:
Timestamp:
Apr 24, 2015, 11:29:43 AM (11 years ago)
Author:
watersc1
Message:

Merge of fixed version of sc_remote_exec/poll

Location:
tags/ipp-20150329/ippScripts/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20150329/ippScripts/scripts/sc_remote_exec.pl

    r38170 r38181  
    9595# Hard coded values
    9696my $DMZ_HOST = $remote_recipe{DMZ_HOST};
    97 my @SEC_HOSTS= @{ $remote_recipe{SEC_HOST} };
    98 my $SEC_HOST;
    99 if ($#SEC_HOSTS != -1) {
    100     $SEC_HOST = $SEC_HOSTS[int(rand(@SEC_HOSTS))];
    101 }
    102 else {
    103     $SEC_HOST = '';
     97my @SEC_HOSTS = ();
     98my $SEC_HOST = '';
     99
     100if (defined($remote_recipe{SEC_HOST})) {
     101    @SEC_HOSTS = @{ $remote_recipe{SEC_HOST} };
     102    if ($#SEC_HOSTS != -1) {
     103       
     104        $SEC_HOST = $SEC_HOSTS[int(rand(@SEC_HOSTS))];
     105    }
     106    else {
     107        $SEC_HOST = '';
     108    }
    104109}
    105110my $IPP_PATH = $remote_recipe{IPP_PATH};
    106111my $remote_root  = $remote_recipe{REMOTE_ROOT};
     112
    107113
    108114my $ipprc = PS::IPP::Config->new( $camera ) or my_die( "Unable to set up", $remote_id);
     
    201207    }
    202208    else {
    203         $cmd = "$ssh -n $DMZ_HOST $cmd";
     209        $cmd = "$scp $file $DMZ_HOST:${destination}";
    204210    }
    205211
     
    223229    }
    224230    else {
    225         $cmd = "$ssh -n $DMZ_HOST $cmd";
     231        $cmd = "$scp $DMZ_HOST:${destination}  $file";
    226232    }
    227233
  • tags/ipp-20150329/ippScripts/scripts/sc_remote_poll.pl

    r38170 r38181  
    6565    defined($cmd_recipe) and
    6666    defined($job_id);
    67 
    6867
    6968
     
    116115# Hard coded values
    117116my $DMZ_HOST = $remote_recipe{DMZ_HOST};
    118 my @SEC_HOSTS= @{ $remote_recipe{SEC_HOST} };
    119 my $SEC_HOST;
    120 if ($#SEC_HOSTS != -1) {
    121     $SEC_HOST = $SEC_HOSTS[int(rand(@SEC_HOSTS))];
    122 }
    123 else {
    124     $SEC_HOST = '';
     117my @SEC_HOSTS = ();
     118my $SEC_HOST = '';
     119
     120if (defined($remote_recipe{SEC_HOST})) {
     121    @SEC_HOSTS = @{ $remote_recipe{SEC_HOST} };
     122    if ($#SEC_HOSTS != -1) {
     123        $SEC_HOST = $SEC_HOSTS[int(rand(@SEC_HOSTS))];
     124    }
     125    else {
     126        $SEC_HOST = '';
     127    }
    125128}
    126129my $IPP_PATH = $remote_recipe{IPP_PATH};
     
    434437    }
    435438    else {
    436         $cmd = "$scp $file ${DMZ_HOST}:${destination}";
     439        $cmd = "$scp  ${DMZ_HOST}:${destination} $file";
    437440    }
    438441
Note: See TracChangeset for help on using the changeset viewer.