Changeset 16591 for trunk/pstamp/scripts/pstamp_runcommand.sh
- Timestamp:
- Feb 21, 2008, 6:38:46 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_runcommand.sh (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_runcommand.sh
r16358 r16591 2 2 ### 3 3 # 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 6 7 # server and execute the command given by the argument list 8 # This script is used by cgi or php scripts. 7 9 8 10 if [[ $# == 0 ]] ;then … … 15 17 16 18 # These variables need to be customized for a particular installation 19 # XXX: why not pass these on on the command line ? 17 20 export 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 recently21 #export LD_LIBRARY_PATH=/usr/local/lib22 21 23 22 WORK_DIR=/export/data1/bills/pstamp/work … … 30 29 cd $WORK_DIR 31 30 status=$? 32 if [[ ! $status]] ; then31 if [[ $status != 0 ]] ; then 33 32 echo $0 cannot cd to WORK_DIR: $WORK_DIR status: $status >&2 34 33 exit $status 35 34 fi 36 35 37 # TODO: I do this so that I have permissions to modify the files created by38 # the web server user apache.39 #umask 040 41 36 ### 42 ### configure IPP37 ### configure the IPP 43 38 ### 44 #export MANPATH=""45 39 46 40 source $PSCONFDIR/psconfig.bash default 47 41 status=$? 48 if [[ ! $status]] ; then42 if [[ $status != 0 ]] ; then 49 43 echo error setting up IPP environment >&2 50 44 exit $status … … 53 47 ### 54 48 ### Add our command directory to the path. 55 ### TODO: This won't be necessary once the scripts get installed as part of the IPP49 ### XXX: This won't be necessary once the scripts get installed as part of the IPP 56 50 ### 57 51 PATH=${CMD_DIR}:${PATH} 58 52 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 62 57 if [[ ! -x `which $1 2> /dev/null` ]] ;then 63 58 status=$?
Note:
See TracChangeset
for help on using the changeset viewer.
