概述
/etc/init.d/目录下新建jboss,内容如下。然后:1、赋权chmod +x jboss;2、启动项chkconfig --add jboss
#!/bin/sh
#chkconfig: 345 99 10
#description: JBoss auto start-stop script.
# Source function library.
. /etc/rc.d/init.d/functions
# Get config.
. /etc/sysconfig/network
# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0
### CHANGE THE STARTUP PATH TO YOUR START SCRIPT ###
startup='/usr/local/jboss/bin/standalone.sh > /dev/null 2> /dev/null &'
shutdown='killall java'
start(){
echo -n $"Starting JBoss service: "
$startup
RETVAL=$?
echo
}
stop(){
action $"Stopping JBoss service: " $shutdown
RETVAL=$?
echo
}
restart(){
stop
sleep 10
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29665621/viewspace-1755738/,如需转载,请注明出处,否则将追究法律责任。
最后
以上就是无语雪碧为你收集整理的linux jboss 开机启动,jboss开机启动的全部内容,希望文章能够帮你解决linux jboss 开机启动,jboss开机启动所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复