{"id":262,"date":"2015-03-04T14:49:08","date_gmt":"2015-03-04T14:49:08","guid":{"rendered":"http:\/\/justmakeit.es\/?p=262"},"modified":"2015-03-04T14:55:19","modified_gmt":"2015-03-04T14:55:19","slug":"jboss-startup-script","status":"publish","type":"post","link":"http:\/\/justmakeit.es\/?p=262","title":{"rendered":"JBoss startup script"},"content":{"rendered":"<p>A continuaci\u00f3n voy a incluir un script que he escrito, siguiendo las recomendaciones le\u00eddas en alg\u00fan sitio (lamento no poder dar las fuentes, pero no las recuerdo), para iniciar y para el servidor de aplicaciones JBoss.<\/p>\n<p>En este caso la versi\u00f3n para la que aplica es la 7.1.1.<br \/>\n<img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/2.bp.blogspot.com\/-n41wI0rJ2nU\/Tkz95adn05I\/AAAAAAAAABo\/FbpAF3wPI5I\/s1600\/AS7.png\" alt=\"JBoss AS\" height=\"155\" width=\"239\"\/><\/p>\n<p><code><br \/>\n#!\/bin\/sh<\/p>\n<p>export FILE_LOG=\/path_to_logs\/startup.log<br \/>\nexport JBOSS_PIDFILE=\/path_to_logs\/pidfile.txt<br \/>\necho JBOSS_PIDFILE=${JBOSS_PIDFILE} | cat >> ${FILE_LOG}<\/p>\n<p>case \"$1\" in<br \/>\nstart)<\/p>\n<p>  echo Hora y fecha inicio del arranque $(date +\"%y\/%m\/%d %H:%M:%S\" | sed 's\/^[0]*\/\/') | cat >> ${FILE_LOG}<br \/>\n  export LAUNCH_JBOSS_IN_BACKGROUND=1<\/p>\n<p>  .\/standalone.sh &<br \/>\n  echo $! >$JBOSS_PIDFILE<br \/>\n  echo Hora y fecha de arranque $(date +\"%y\/%m\/%d %H:%M:%S\" | sed 's\/^[0]*\/\/') | cat >> ${FILE_LOG}<br \/>\n  ;;<\/p>\n<p>stop)<\/p>\n<p>  # This will kill the startup.sh process AND the JBoss AS java process.<br \/>\n  echo Hora y fecha de inicio de parada $(date +\"%y\/%m\/%d %H:%M:%S\" | sed 's\/^[0]*\/\/') | cat >> ${FILE_LOG}<br \/>\n  kill `cat $JBOSS_PIDFILE`<br \/>\n  echo Hora y fecha de fin de parada $(date +\"%y\/%m\/%d %H:%M:%S\" | sed 's\/^[0]*\/\/') | cat >> ${FILE_LOG}<br \/>\n  ;;<br \/>\nesac<br \/>\n<\/code><\/p>\n<p>Este script tiene algunas limitaciones, como el hecho de no poder parar el servidor si \u00e9ste no se ha iniciado con el script. Adem\u00e1s guarda informaci\u00f3n sobre los arranques y paradas del servidor para su posterior consulta en el fichero startup.log<\/p>\n<p>Para usarlo, con el usuario que tenga permisos de ejecuci\u00f3n del servidor:<br \/>\n<code><br \/>\n    .\/startup start<br \/>\n    .\/startup stop<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A continuaci\u00f3n voy a incluir un script que he escrito, siguiendo las recomendaciones le\u00eddas en alg\u00fan sitio (lamento no poder &hellip; <a href=\"http:\/\/justmakeit.es\/?p=262\" class=\"btn btn-readmore\">Read More <span class=\"screen-reader-text\"> \u00abJBoss startup script\u00bb<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,33,14],"tags":[],"class_list":["post-262","post","type-post","status-publish","format-standard","hentry","category-aws","category-jboss","category-programacion"],"_links":{"self":[{"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/posts\/262","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/justmakeit.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=262"}],"version-history":[{"count":5,"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions"}],"predecessor-version":[{"id":267,"href":"http:\/\/justmakeit.es\/index.php?rest_route=\/wp\/v2\/posts\/262\/revisions\/267"}],"wp:attachment":[{"href":"http:\/\/justmakeit.es\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=262"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/justmakeit.es\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=262"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/justmakeit.es\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=262"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}