forked from GsDevKit/gsDevKitHome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallServer
executable file
·82 lines (64 loc) · 2.06 KB
/
installServer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#! /bin/bash
#=========================================================================
# Copyright (c) 2014, 2015 GemTalk Systems, LLC <dhenrich@gemtalksystems.com>.
#=========================================================================
echo "================="
echo " GsDevKit script: $(basename $0) $*"
echo "================="
usage() {
cat <<HELP
USAGE: $(basename $0) [-h] [-f] <stone-name> <gemstone-version>
Install GemStone/S, create a stone, start the stone, create a todeClient
image. Runs the installGemstone, createTodeImage, createStone,
startStone, startNetldi, startStatmonitor, installTodeStone and
todeClient scripts.
If a stone named $stoneName exists, the existing directory will be left
alone unless the -f option is specified in which case the existing
stone directory is deleted.
If a todeClient image exists, the creation of a new image will be skipped
unless the -f option is specified in which case the todeClient image is
re-created.
OPTIONS
-h display help
-f force creation of stone and tode image
EXAMPLES
$(basename $0) -h
$(basename $0) kit 3.2.1
$(basename $0) -f kit 3.2.1
HELP
}
set -e # exit on error
if [ "${GS_HOME}x" = "x" ] ; then
echo "the GS_HOME environment variable needs to be defined"; exit 1
fi
forceArg=""
while getopts "fhns:" OPT ; do
case "$OPT" in
h) usage; exit 0;;
f) forceArg="-f";;
*) usage; exit 1;;
esac
done
shift $(($OPTIND - 1))
if [ $# -ne 2 ]; then
usage; exit 1
fi
stoneName="$1"
gsvers="$2"
$GS_HOME/bin/installGemStone $gsvers
$GS_HOME/bin/createTodeImage $forceArg
$GS_HOME/bin/createStone $forceArg $stoneName $gsvers
if [ "${GS_TRAVIS}x" = "x" ] ; then
$GS_HOME/bin/startStatmonitor $stoneName
else
# running on travis server - statmonitor fails on startup (bug #44491)
echo "skipping $GS_HOME/bin/startStatmonitor $stoneName"
fi
$GS_HOME/bin/installTodeStone $stoneName
if [ "${GS_TRAVIS}x" = "x" ] ; then
$GS_HOME/bin/todeClient
else
# running on travis server - don't start todeClient
echo "skipping $GS_HOME/bin/todeClient"
fi
echo "...finished $(basename $0)"