Changeset 35569
- Timestamp:
- May 9, 2013, 1:57:14 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_save_server_status.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_save_server_status.pl
r30469 r35569 11 11 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt ); 12 12 use Pod::Usage qw( pod2usage ); 13 13 # 14 14 # XXX: We should get this from site.config, but that would about double 15 15 # the execution time for this script. 16 my $rundir = "/data/ippc17.0/pstamp";17 16 18 my $status_file = "$rundir/web/status.html"; 17 19 18 20 19 my $updatelink; 21 20 my $verbose; 22 21 my $save_temps; 22 my $pstamp_workdir; 23 23 24 24 GetOptions( 25 ' rundir=s' => \$rundir,25 'workdir=s' => \$pstamp_workdir, 26 26 'update-link' => \$updatelink, 27 27 'verbose' => \$verbose, … … 37 37 } 38 38 39 if (!$pstamp_workdir) { 40 my $ipprc = PS::IPP::Config->new(); # IPP Configuration 41 $pstamp_workdir = metadataLookupStr($ipprc->{_siteConfig}, 'PSTAMP_WORKDIR'); 42 } 43 44 if (!$pstamp_workdir) { 45 warn("Failed to find PSTAMP_WORKDIR in the config\n"); 46 exit($PS_EXIT_CONFIG_ERROR); 47 } 48 my $status_file = "$pstamp_workdir/server_status/status.html"; 49 39 50 my ($sec, $min, $hour, $mday, $month, $year) = gmtime; 40 51 $year += 1900; 41 52 $month += 1; 42 53 43 my $dir = sprintf "$ rundir/work/server_status/%4d/%02d/%02d", $year, $month, $mday;54 my $dir = sprintf "$pstamp_workdir/server_status/%4d/%02d/%02d", $year, $month, $mday; 44 55 45 56 if (!-e $dir ) {
Note:
See TracChangeset
for help on using the changeset viewer.
