Skip to content

Commit 12b53f9

Browse files
committed
Merge pull request #28 from GsDevKit/dev
Issue #27: Need to be able to specify alternate location for gemstone.secret file in start/stop/restart scripts
2 parents eec8f96 + 11a422d commit 12b53f9

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

bin/startGemServerGem

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,15 @@ set -e # exit on error
3030
#
3131
# export GS_DEBUG_VMGC_PRINT_MKSW_MEMORY_USED=75
3232

33-
if [ -s $GEMSTONE/seaside/etc/gemstone.secret ]; then
34-
. $GEMSTONE/seaside/etc/gemstone.secret
33+
secret=${GEMSTONE_ETC_SECRET}
34+
if [ "${GEMSTONE_ETC_SECRET}x" = "x" ] ; then
35+
secret=$GEMSTONE/seaside/etc/gemstone.secret
36+
fi
37+
38+
if [ -s $secret ]; then
39+
. $secret
3540
else
36-
echo 'Missing password file $GEMSTONE/seaside/etc/gemstone.secret'
41+
echo 'Missing password file $secret'
3742
exit 1
3843
fi
3944

@@ -49,11 +54,16 @@ if [ "${logDir}x" = "x" ] ; then
4954
fi
5055
logFile="${logDir}/${GemServer}_server-${Port}.log"
5156

57+
username=$GEMSTONE_USER_NAME
58+
if [ "${GEMSTONE_USER_NAME}x" = "x" ] ; then
59+
username=DataCurator
60+
fi
61+
5262
echo "Starting $GemServer on $Port exeConf: -$ExeConf- logFile: -$logFile-"
5363

5464
cat << EOF | nohup $GEMSTONE/bin/topaz -l ${ExeArg} >> $logFile 2>&1 &
5565
56-
set user DataCurator pass $GEMSTONE_CURATOR_PASS gems $GEMSTONE_NAME
66+
set user $username pass $GEMSTONE_CURATOR_PASS gems $GEMSTONE_NAME
5767
5868
display oops
5969
iferror stack

0 commit comments

Comments
 (0)