Skip to content

Commit

Permalink
Merge pull request #10 from GsDevKit/master
Browse files Browse the repository at this point in the history
merge v1.0.6
  • Loading branch information
dalehenrich committed Feb 7, 2015
2 parents b7a64aa + 12b53f9 commit b0539dc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 6 deletions.
24 changes: 19 additions & 5 deletions bin/startGemServerGem
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
7 changes: 6 additions & 1 deletion bin/stopGemServerGem
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down

0 comments on commit b0539dc

Please sign in to comment.