forked from WASdev/ci.docker.websphere-traditional
-
Notifications
You must be signed in to change notification settings - Fork 4
/
start.sh
executable file
·48 lines (39 loc) · 1.47 KB
/
start.sh
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
#!/bin/bash
#####################################################################################
# #
# Script to start the server #
# #
# Usage : start.sh #
# #
#####################################################################################
if [ "$UPDATE_HOSTNAME" = "true" ]
then
#Get the container hostname
host=`hostname`
#Check whether node name is provided or use default
if [ "$NODE_NAME" = "" ]
then
NODE_NAME="DefaultNode01"
fi
# Update the hostname
/opt/IBM/WebSphere/AppServer/bin/wsadmin.sh -lang jython -conntype NONE -f /work/updateHostName.py \
$NODE_NAME $host
fi
#Check whether profile name is provided or use default
if [ "$PROFILE_NAME" = "" ]
then
PROFILE_NAME="AppSrv01"
fi
echo "Starting server......................."
/opt/IBM/WebSphere/AppServer/profiles/$PROFILE_NAME/bin/startServer.sh server1
if [ $? != 0 ]
then
echo " AppServer startup failed , exiting......"
exit 1
fi
sleep 10
#Check the existence of server process
while [ -f "/opt/IBM/WebSphere/AppServer/profiles/$PROFILE_NAME/logs/server1/server1.pid" ]
do
sleep 5
done