--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
vertx runmod my.module.my~app~1.0 -conf config.json
#!/bin/bash
#
#####################################################################################################
# VARIABLES
#####################################################################################################
JAVA_HOME="/usr/local/java/jdk1.7.0_51"
#JVM Parameters of JMX monitoring
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote=<true|false> -Dcom.sun.management.jmxremote.port=<PORT> -Dcom.sun.management.jmxremote.authenticate=<false|true> -Dcom.sun.management.jmxremote.ssl=<true|false> -Djava.rmi.server.hostname=<IP or HOSTNAME>"
VERTX_HOME="/vertx/current"
PROJECT_HOME="/vertx/aplicaciones/es.my.app"
#Path to properties config file
CONFIG_FILE="/properties/myapp/config.json"
#runmod with main module
OPTIONS="runmod es.my.app~platform~1.0 -conf $CONFIG_FILE"
VERTX_OPTS="-Dvertx.langs.java=es.my.app~shared~1.0:es.my.app.shared.GuiceVerticleFactory"
ENVIRONMENT="DES"
RETVAL=0
PIDFILE=/var/local/vertx/my.app.pid
LOGFILE=/dev/null
#####################################################################################################
# END CONFIGURATION SCRIPT
#####################################################################################################
EXEC="exec -a $ENVIRONMENT $JAVA_HOME/bin/java $JAVA_OPTS $VERTX_OPTS -Dvertx.mods=$PROJECT_HOME/mods/ -Djava.util.logging.config.file=$VERTX_HOME/conf/logging.properties \
-Dvertx.home=$VERTX_HOME -Dvertx.clusterManagerFactory=org.vertx.java.spi.cluster.impl.hazelcast.HazelcastClusterManagerFactory \
-classpath :$VERTX_HOME/conf:$VERTX_HOME/lib/*:$PROJECT_HOME org.vertx.java.platform.impl.cli.Starter $OPTIONS &> $LOGFILE"
# Source function library.
. /etc/init.d/functions
#####################################################################################################
# MAIN
#####################################################################################################
start() {
if [ -f $PIDFILE ] && kill -0 $(cat $PIDFILE); then
echo 'Service already running' >&2
return 1
fi
echo -n $"Starting vertx: "
daemon "$EXEC &"
RETVAL=$?
pidof $ENVIRONMENT > $PIDFILE
}
stop() {
echo -n $"Shutting down vertx: "
killproc -p $PIDFILE
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f $lockfile
return $RETVAL
}
restart() {
stop
start
}
rhstatus() {
status -p $PIDFILE "VERTX_$ENVIRONMENT"
RETVAL=$?
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
status)
rhstatus
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 3
esac
exit $?
vertx runmod my.module.my~app~1.0 -conf config.json --fork
vertx runmod my.module.my~app~1.0 -conf config.json
vertx runmod my.module.my~app~1.0 --fork my.app.pid
vertx stopmod my.app.pid
vertx restartmod my.app.pid
--
You received this message because you are subscribed to the Google Groups "vert.x" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vertx+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
A mor complex example of on JVM process launching and control I can provide here:
https://github.com/cinterloper/Vert.Xecutor/blob/master/src/main/resources/exe.groovy
I use very.executor to async launch arbitrary processes via shellcode and monitor their output
Isee Well then processBuilder in the jdk should do u fine