-
Notifications
You must be signed in to change notification settings - Fork 2
/
jboss.sh
70 lines (58 loc) · 1.86 KB
/
jboss.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/bin/bash
# Author: Roman Kharkovski, IBM, blog: http://whywebsphere.com
# TODO - after fresh JBoss install, make sure to update the file 'standalone.xml' to change 'deployment-scanner' to scan-interval="100"
PORT=8080
SERVER_INSTALL_DIR=$SERVER_HOME/jboss-eap-6.4
export JBOSS_HOME=$SERVER_INSTALL_DIR
STD_OUT_FILE="$SERVER_INSTALL_DIR/standalone/log/server.log"
STOP_LOG_FILE=$STD_OUT_FILE
# Admin console: http://127.0.0.1:9990
START_COMMAND="jboss_start"
START_MESSAGE="JBAS015874"
STOP_COMMAND="jboss_stop"
STOP_MESSAGE="JBAS015950"
DEPLOY_DIR=$SERVER_INSTALL_DIR/standalone/deployments
#UNDEPLOY_APP_MESSAGE="JBAS018558"
###############################################
# Delete logs and other stuff from install dir
###############################################
cleanup_server()
{
echo "cleanup_server()..."
rm -rf $DEPLOY_DIR
mkdir $DEPLOY_DIR
}
###############################################
# Create new server instance
###############################################
create_server()
{
echo "create_server()..."
cp server_configurations/jboss/standalone.xml $SERVER_INSTALL_DIR/standalone/configuration
}
###############################################
# Start server
###############################################
jboss_start()
{
# $SERVER_INSTALL_DIR/bin/standalone.sh
( $SERVER_INSTALL_DIR/bin/standalone.sh & ) > /dev/null 2>&1
}
###############################################
# Stop server
###############################################
jboss_stop()
{
( $SERVER_INSTALL_DIR/bin/jboss-cli.sh --connect command=:shutdown & ) > /dev/null 2>&1
}
###############################################
# Just in case we need to do something
###############################################
jboss_HelloWorld_predeploy()
{
echo "<--->jboss_HelloWorld_predeploy(): nothing to do"
}
jboss_HelloWorld_postdeploy()
{
echo "<--->jboss_HelloWorld_postdeploy(): nothing to do"
}