IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35569


Ignore:
Timestamp:
May 9, 2013, 1:57:14 PM (13 years ago)
Author:
bills
Message:

move location of status.html file from pstamp/web to the working directory where
it will be invisible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_save_server_status.pl

    r30469 r35569  
    1111use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
    1212use Pod::Usage qw( pod2usage );
    13 
     13#
    1414# XXX: We should get this from site.config, but that would about double
    1515# the execution time for this script.
    16 my $rundir = "/data/ippc17.0/pstamp";
    1716
    18 my $status_file = "$rundir/web/status.html";
     17
    1918
    2019my $updatelink;
    2120my $verbose;
    2221my $save_temps;
     22my $pstamp_workdir;
    2323
    2424GetOptions(
    25     'rundir=s'      => \$rundir,
     25    'workdir=s'      => \$pstamp_workdir,
    2626    'update-link'    => \$updatelink,
    2727    'verbose'       => \$verbose,
     
    3737}
    3838
     39if (!$pstamp_workdir) {
     40    my $ipprc = PS::IPP::Config->new(); # IPP Configuration
     41    $pstamp_workdir = metadataLookupStr($ipprc->{_siteConfig}, 'PSTAMP_WORKDIR');
     42}
     43
     44if (!$pstamp_workdir) {
     45    warn("Failed to find PSTAMP_WORKDIR in the config\n");
     46    exit($PS_EXIT_CONFIG_ERROR);
     47}
     48my $status_file = "$pstamp_workdir/server_status/status.html";
     49
    3950my ($sec, $min, $hour, $mday, $month, $year) = gmtime;
    4051$year += 1900;
    4152$month += 1;
    4253
    43 my $dir = sprintf "$rundir/work/server_status/%4d/%02d/%02d", $year, $month, $mday;
     54my $dir = sprintf "$pstamp_workdir/server_status/%4d/%02d/%02d", $year, $month, $mday;
    4455
    4556if (!-e $dir ) {
Note: See TracChangeset for help on using the changeset viewer.