-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from ba-st/sunit_extensions
Add Dependent-SUnit-Extensions component for GS64
- Loading branch information
Showing
7 changed files
with
79 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,45 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "${NETLDI_SERVICE_NAME} ${NETLDI_PORT}/tcp # GemStone - Netldi" >> /etc/services | ||
|
||
# Ensure write permissions | ||
NEED_WRITE_PERMISSION=( | ||
"${GEMSTONE_GLOBAL_DIR}/locks/" | ||
"${GEMSTONE_LOG_DIR}/" | ||
) | ||
|
||
for path in "${NEED_WRITE_PERMISSION[@]}"; do | ||
if ! gosu "${GS_USER}" test -w "$path"; then | ||
chown "${GS_UID}:${GS_GID}" "$path" | ||
chmod ug+w "$path" | ||
# Prepare Launchpad topaz input script | ||
readonly SYSTEM_USER_PASSWORD="${GS64_SYSTEM_USER_PASSWORD:-swordfish}" | ||
readonly STONE_NAME="${GS64_STONE_SERVICE_NAME:-gs64stone}" | ||
|
||
set -e | ||
readonly LAUNCHPAD_TOPAZ_SCRIPT="${GEMSTONE_GLOBAL_DIR}/launchpad-start.tpz" | ||
set +o histexpand | ||
echo "set gemstone !@${GS64_STONE_HOSTNAME}!${STONE_NAME} user SystemUser pass ${SYSTEM_USER_PASSWORD}" >> "${LAUNCHPAD_TOPAZ_SCRIPT}" | ||
set -o histexpand | ||
|
||
pid=0 | ||
|
||
termination_handler() { | ||
exit_status=0 | ||
if [ $pid -ne 0 ]; then | ||
echo 'SIGTERM received, shutting down the gem' | ||
kill "$pid" | ||
stopnetldi | ||
wait "$pid" | ||
exit_status=$? | ||
fi | ||
done | ||
exit "$exit_status" | ||
} | ||
|
||
trap 'termination_handler' SIGTERM | ||
|
||
# shellcheck disable=SC2086 | ||
startnetldi \ | ||
-g \ | ||
-a "${GS_USER}" \ | ||
-n \ | ||
-P "${NETLDI_PORT}" \ | ||
-l "${GEMSTONE_LOG_DIR}/${NETLDI_SERVICE_NAME}.log" \ | ||
-D "${GEMSTONE_LOG_DIR}" \ | ||
${NETLDI_ARGS:-} \ | ||
"${NETLDI_SERVICE_NAME}" >> "${GEMSTONE_LOG_DIR}/startnetldi.log" | ||
|
||
# list GemStone services | ||
gslist -cvl >> "${GEMSTONE_LOG_DIR}/startnetldi.log" | ||
|
||
# Run as GS_USER | ||
exec gosu "${GS_USER}" "${GEMSTONE_GLOBAL_DIR}/launchpad-gem" "$@" | ||
topaz -l -q -I "${LAUNCHPAD_TOPAZ_SCRIPT}" -S "${GEMSTONE_GLOBAL_DIR}/command-line-handler.tpz" -- launchpad "$@" & | ||
pid="$!" | ||
wait "$pid" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
RwSimpleProjectLoadComponentV2 { | ||
#name : 'Dependent-SUnit-Extensions', | ||
#condition : 'sunit', | ||
#projectNames : [ ], | ||
#componentNames : [ | ||
'Deployment' | ||
], | ||
#packageNames : [ | ||
'Launchpad-SUnit' | ||
], | ||
#conditionalPackageMapSpecs : { | ||
'gemstone' : { | ||
'allusers' : { | ||
#packageNameToPlatformPropertiesMap : { | ||
'Launchpad-SUnit' : { 'symbolDictName' : 'Launchpad' } | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
RwLoadSpecificationV2 { | ||
#specName: 'Launchpad-Dependent-SUnit-Extensions', | ||
#projectName : 'Launchpad', | ||
#diskUrl : 'Launchpad', | ||
#projectSpecFile : 'rowan/project.ston', | ||
#componentNames : [ | ||
'Dependent-SUnit-Extensions' | ||
], | ||
#customConditionalAttributes : [ | ||
'tests', | ||
'sunit' | ||
] | ||
} |