IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 24, 2013, 1:37:30 PM (13 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/ipp-20130509
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130509

  • branches/eam_branches/ipp-20130509/pstamp/scripts

  • branches/eam_branches/ipp-20130509/pstamp/scripts/pstamp_save_server_status.pl

    r30469 r35594  
    1212use Pod::Usage qw( pod2usage );
    1313
    14 # XXX: We should get this from site.config, but that would about double
    15 # the execution time for this script.
    16 my $rundir = "/data/ippc17.0/pstamp";
    17 
    18 my $status_file = "$rundir/web/status.html";
    19 
    2014my $updatelink;
    2115my $verbose;
    2216my $save_temps;
     17my $pstamp_workdir;
    2318
    2419GetOptions(
    25     'rundir=s'      => \$rundir,
     20    'workdir=s'      => \$pstamp_workdir,
    2621    'update-link'    => \$updatelink,
    2722    'verbose'       => \$verbose,
     
    3732}
    3833
     34if (!$pstamp_workdir) {
     35    my $ipprc = PS::IPP::Config->new(); # IPP Configuration
     36    $pstamp_workdir = metadataLookupStr($ipprc->{_siteConfig}, 'PSTAMP_WORKDIR');
     37}
     38
     39if (!$pstamp_workdir) {
     40    warn("Failed to find PSTAMP_WORKDIR in the config\n");
     41    exit($PS_EXIT_CONFIG_ERROR);
     42}
     43my $status_file = "$pstamp_workdir/server_status/status.html";
     44
    3945my ($sec, $min, $hour, $mday, $month, $year) = gmtime;
    4046$year += 1900;
    4147$month += 1;
    4248
    43 my $dir = sprintf "$rundir/work/server_status/%4d/%02d/%02d", $year, $month, $mday;
     49my $dir = sprintf "$pstamp_workdir/server_status/%4d/%02d/%02d", $year, $month, $mday;
    4450
    4551if (!-e $dir ) {
Note: See TracChangeset for help on using the changeset viewer.