#!/bin/sh
set -x
LOG_DIR=/home/lyu/Work/AppServer/jboss-eap-6.4/standalone/log
EAP_HOME=/home/lyu/Work/AppServer/jboss-eap-6.4
CONF_DIR=/home/lyu/Work/AppServer/jboss-eap-6.4/standalone/configuration
JSVC_BIN=/home/lyu/Downloads/case_downloads/jvsc_orig/commons-daemon-1.0.15-native-src/unix/jsvc
#/home/lyu/Downloads/case_downloads/commons-daemon-1.0.15-native-src/unix/jsvc.orig
JSVC_JAR=/home/lyu/Downloads/case_downloads/commons-daemon-1.0.15/commons-daemon-1.0.15.jar

$JSVC_BIN \
-nodetach \
-debug \
-java-home /opt/java/jdk7/  \
-user lyu \
-pidfile $LOG_DIR/jsvc.pid  \
-wait 10 \
-outfile $LOG_DIR/jsvc.out.log   \
-errfile $LOG_DIR/jsvc.err.log   \
-classpath $EAP_HOME/jboss-modules.jar:$JSVC_JAR \
-D[Standalone] -server -XX:+UseCompressedOops -Xms1303m \
-Xmx1303m -XX:MaxPermSize=256m \
-Djava.net.preferIPv4Stack=true \
-Djboss.modules.system.pkgs=org.jboss.byteman \
-Djava.awt.headless=true \
-Djboss.modules.policy-permissions=true \
-Dorg.jboss.boot.log.file=$LOG_DIR/server.log \
-Dlogging.configuration=file:$CONF_DIR/logging.properties \
@org.jboss.modules.Main -start-method main \
-mp $EAP_HOME/modules \
-jaxpmodule javax.xml.jaxp-provider \
org.jboss.as.standalone \
-Djboss.home.dir=$EAP_HOME \
-Djboss.server.base.dir=$EAP_HOME/standalone 
