-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathglassfish.sh
56 lines (45 loc) · 1.43 KB
/
glassfish.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
49
50
51
52
53
54
55
56
#!/bin/bash
# Author: Roman Kharkovski, IBM, blog: http://whywebsphere.com
SERVER_INSTALL_DIR=$SERVER_HOME/glassfish4/glassfish
INSTANCE_DIR=$SERVER_INSTALL_DIR/domains/domain1
STD_OUT_FILE=$INSTANCE_DIR/logs/server.log
STOP_LOG_FILE=$STD_OUT_FILE
PORT=8080
# admin console: http://localhost:4848
START_COMMAND="$SERVER_INSTALL_DIR/bin/asadmin start-domain"
START_MESSAGE="NCLS-CORE-00017"
STOP_COMMAND="$SERVER_INSTALL_DIR/bin/asadmin stop-domain"
STOP_MESSAGE="JMXStartupService and JMXConnectors have been shut down"
DEPLOY_DIR=$INSTANCE_DIR/autodeploy
###############################################
# Delete logs and other stuff from install dir
###############################################
cleanup_server()
{
echo "--->cleanup_server()"
rm -rf $DEPLOY_DIR
mkdir $DEPLOY_DIR
rm -rf $INSTANCE_DIR/applications
mkdir $INSTANCE_DIR/applications
rm -rf $INSTANCE_DIR/generated
mkdir $INSTANCE_DIR/generated
echo "<---cleanup_server()"
}
###############################################
# Create new server instance
###############################################
create_server()
{
echo "<--->create_server()"
}
###############################################
# Just in case we need to do something
###############################################
glassfish_HelloWorld_predeploy()
{
echo "<--->glassfish_HelloWorld_predeploy(): nothing to do"
}
glassfish_HelloWorld_postdeploy()
{
echo "<--->glassfish_HelloWorld_postdeploy(): nothing to do"
}