diff --git a/bin/startGemServerGem b/bin/startGemServerGem index 06403c3..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 @@ -43,13 +48,22 @@ else ExeArg="-e $3" fi -logFile="${GEMSTONE_LOGDIR}/${GemServer}_server-${Port}.log" +logDir=${GEMSTONE_LOGDIR} +if [ "${logDir}x" = "x" ] ; then + logDir=/opt/gemstone/log +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 diff --git a/bin/stopGemServerGem b/bin/stopGemServerGem index e27ab20..38b49cc 100755 --- a/bin/stopGemServerGem +++ b/bin/stopGemServerGem @@ -4,7 +4,12 @@ GemServer="$1" Port="$2" # must match GemServer>>gemPidFileName: -pidfile="${GEMSTONE_LOGDIR}/${GemServer}_server-${Port}.pid" + +logDir=${GEMSTONE_LOGDIR} +if [ "${logDir}x" = "x" ] ; then + logDir=/opt/gemstone/log +fi +pidfile="${logDir}/${GemServer}_server-${Port}.pid" if [ -e $pidfile ]; then pid=`cat $pidfile`