IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 43073


Ignore:
Timestamp:
Sep 3, 2026, 1:56:50 PM (3 weeks ago)
Author:
eugene
Message:

look up rundir from IPP Config system

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-pstamp-20260421/pstamp/scripts/pstamp_save_server_status.pl

    r43052 r43073  
    1616my $save_temps;
    1717my $pstamp_workdir;
     18my $pstamp_rundir;
    1819
    1920GetOptions(
    … …  
    3233}
    3334
     35my $ipprc;
     36
    3437if (!$pstamp_workdir) {
    35     my $ipprc = PS::IPP::Config->new(); # IPP Configuration
     38    $ipprc = PS::IPP::Config->new(); # IPP Configuration
    3639    $pstamp_workdir = metadataLookupStr($ipprc->{_siteConfig}, 'PSTAMP_WORKDIR');
    3740}
    38 
    3941if (!$pstamp_workdir) {
    4042    warn("Failed to find PSTAMP_WORKDIR in the config\n");
    … …  
    4244}
    4345my $status_file = "$pstamp_workdir/server_status/status.html";
     46
     47if (!$pstamp_rundir) {
     48    if (not defined $ipprc) {
     49        $ipprc = PS::IPP::Config->new(); # IPP Configuration
     50    }
     51    $pstamp_rundir = metadataLookupStr($ipprc->{_siteConfig}, 'PSTAMP_RUNDIR');
     52}
     53if (!$pstamp_rundir) {
     54    warn("Failed to find PSTAMP_RUNDIR in the config\n");
     55    exit($PS_EXIT_CONFIG_ERROR);
     56}
    4457
    4558my ($sec, $min, $hour, $mday, $month, $year) = gmtime;
    … …  
    6174    $year, $month, $mday, $hour, $min, $sec;
    6275
    63 my $command = "pstamp_server_status --workdir $pstamp_workdir > $file";
     76my $command = "pstamp_server_status --workdir $pstamp_workdir --rundir $pstamp_rundir > $file";
    6477#my $command = "pstamp_server_status > $file";
    6578my  ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Note: See TracChangeset for help on using the changeset viewer.