IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 21, 2008, 6:38:46 PM (18 years ago)
Author:
bills
Message:

Updates to the postage stamp server scripts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/scripts/pstamp_runcommand.sh

    r16358 r16591  
    22###
    33#
    4 # pstampwrapper.sh:
    5 # Set up the ipp environment to run a ipp commands on behalf of hte postage stamp
     4# pstamp_runcommand.sh:
     5#
     6# Set up the ipp environment to run a ipp commands on behalf of the postage stamp
    67# server and execute the command given by the argument list
     8# This script is used by cgi or php scripts.
    79
    810if [[ $# == 0 ]] ;then
     
    1517
    1618# These variables need to be customized for a particular installation
     19# XXX: why not pass these on on the command line ?
    1720export PSCONFDIR=/export/data0/bills/psconfig
    18 
    19 # TODO shouldn't need to do this but there seems to be a psconfig problem.
    20 # Gene fixed this recently
    21 #export LD_LIBRARY_PATH=/usr/local/lib
    2221
    2322WORK_DIR=/export/data1/bills/pstamp/work
     
    3029cd $WORK_DIR
    3130status=$?
    32 if [[ ! $status ]] ; then
     31if [[ $status != 0 ]] ; then
    3332    echo $0 cannot cd to WORK_DIR: $WORK_DIR status: $status >&2
    3433    exit $status
    3534fi
    3635
    37 # TODO: I do this so that I have permissions to modify the files created by
    38 # the web server user apache.
    39 #umask 0
    40 
    4136###
    42 ### configure IPP
     37### configure the IPP
    4338###
    44 #export MANPATH=""
    4539
    4640source $PSCONFDIR/psconfig.bash default
    4741status=$?
    48 if [[ ! $status ]] ; then
     42if [[ $status != 0 ]] ; then
    4943    echo error setting up IPP environment >&2
    5044    exit $status
     
    5347###
    5448### Add our command directory to the path.
    55 ### TODO: This won't be necessary once the scripts get installed as part of the IPP
     49### XXX: This won't be necessary once the scripts get installed as part of the IPP
    5650###
    5751PATH=${CMD_DIR}:${PATH}
    5852
    59 ## This test is sort of redundant.
    60 ## We'll get a more useful error by just going ahead and trying the command
    61 ## or by not suppressing the output from which
     53## make sure we are able to run the desired command
     54## XXX: This test is sort of redundant.
     55## We'd get a more useful error by just going ahead and trying the command
     56## or by not suppressing the error output of which
    6257if [[ ! -x `which $1 2> /dev/null` ]] ;then
    6358    status=$?
Note: See TracChangeset for help on using the changeset viewer.