]> andersk Git - moira.git/blobdiff - gen/sapprint.sh
Command line printer manipulation client, and build goo.
[moira.git] / gen / sapprint.sh
index 5605ef62be87a137ea6fb72b35c2bcad82a3128e..6fdf353b6aac43dccbdd3d737f0da35530c7e054 100755 (executable)
@@ -1,12 +1,19 @@
 #! /bin/sh
 # $Id$
 
+if [ -d /var/athena ] && [ -w /var/athena ]; then 
+    exec >/var/athena/moira_update.log 2>&1
+else 
+    exec >/tmp/moira_update.log 2>&1
+fi
+
 # The following exit codes are defined and MUST BE CONSISTENT with the
 # error codes the library uses:
 MR_MISSINGFILE=47836473
 
 PATH=/bin
-OUTFILE=/var/tmp/sapprint.out
+OUTFILE=/var/tmp/sapprint.out.moira
+DSTFILE=/var/tmp/sapprint.out
 
 # Alert if the output file doesn't exist
 test -r $OUTFILE || exit $MR_MISSINGFILE
@@ -16,6 +23,9 @@ chown root $OUTFILE
 chgrp 0 $OUTFILE
 chmod 644 $OUTFILE
 
+# mv file into place.
+mv $OUTFILE $DSTFILE
+
 # cleanup
 test -f $0 && rm -f $0
 
This page took 0.031534 seconds and 4 git commands to generate.