Index: trunk/pstamp/scripts/pstamp_save_server_status.pl
===================================================================
--- trunk/pstamp/scripts/pstamp_save_server_status.pl	(revision 35564)
+++ trunk/pstamp/scripts/pstamp_save_server_status.pl	(revision 35569)
@@ -11,17 +11,17 @@
 use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
 use Pod::Usage qw( pod2usage );
-
+#
 # XXX: We should get this from site.config, but that would about double
 # the execution time for this script.
-my $rundir = "/data/ippc17.0/pstamp";
 
-my $status_file = "$rundir/web/status.html";
+
 
 my $updatelink;
 my $verbose;
 my $save_temps;
+my $pstamp_workdir;
 
 GetOptions(
-    'rundir=s'      => \$rundir,
+    'workdir=s'      => \$pstamp_workdir,
     'update-link'    => \$updatelink,
     'verbose'       => \$verbose,
@@ -37,9 +37,20 @@
 }
 
+if (!$pstamp_workdir) {
+    my $ipprc = PS::IPP::Config->new(); # IPP Configuration
+    $pstamp_workdir = metadataLookupStr($ipprc->{_siteConfig}, 'PSTAMP_WORKDIR');
+}
+
+if (!$pstamp_workdir) {
+    warn("Failed to find PSTAMP_WORKDIR in the config\n");
+    exit($PS_EXIT_CONFIG_ERROR);
+}
+my $status_file = "$pstamp_workdir/server_status/status.html";
+
 my ($sec, $min, $hour, $mday, $month, $year) = gmtime;
 $year += 1900;
 $month += 1;
 
-my $dir = sprintf "$rundir/work/server_status/%4d/%02d/%02d", $year, $month, $mday;
+my $dir = sprintf "$pstamp_workdir/server_status/%4d/%02d/%02d", $year, $month, $mday;
 
 if (!-e $dir ) {
