diff --git a/bin/startGemServerGem b/bin/startGemServerGem index 25d824d..9fc8540 100755 --- a/bin/startGemServerGem +++ b/bin/startGemServerGem @@ -30,10 +30,15 @@ set -e # exit on error # # export GS_DEBUG_VMGC_PRINT_MKSW_MEMORY_USED=75 -if [ -s $GEMSTONE/seaside/etc/gemstone.secret ]; then - . $GEMSTONE/seaside/etc/gemstone.secret +secret=${GEMSTONE_ETC_SECRET} +if [ "${GEMSTONE_ETC_SECRET}x" = "x" ] ; then + secret=$GEMSTONE/seaside/etc/gemstone.secret +fi + +if [ -s $secret ]; then + . $secret else - echo 'Missing password file $GEMSTONE/seaside/etc/gemstone.secret' + echo 'Missing password file $secret' exit 1 fi @@ -49,11 +54,16 @@ if [ "${logDir}x" = "x" ] ; then fi logFile="${logDir}/${GemServer}_server-${Port}.log" +username=$GEMSTONE_USER_NAME +if [ "${GEMSTONE_USER_NAME}x" = "x" ] ; then + username=DataCurator +fi + echo "Starting $GemServer on $Port exeConf: -$ExeConf- logFile: -$logFile-" cat << EOF | nohup $GEMSTONE/bin/topaz -l ${ExeArg} >> $logFile 2>&1 & -set user DataCurator pass $GEMSTONE_CURATOR_PASS gems $GEMSTONE_NAME +set user $username pass $GEMSTONE_CURATOR_PASS gems $GEMSTONE_NAME display oops iferror stack