Skip to content

Commit

Permalink
Merge pull request #28 from GsDevKit/dev
Browse files Browse the repository at this point in the history
Issue #27: Need to be able to specify alternate location for gemstone.secret file in start/stop/restart scripts
  • Loading branch information
dalehenrich committed Feb 2, 2015
2 parents eec8f96 + 11a422d commit 12b53f9
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 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 @@ -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
Expand Down

0 comments on commit 12b53f9

Please sign in to comment.