Start JBoss 7 as a service on Linux

后端 未结 12 1995
闹比i
闹比i 2020-12-12 11:54

Previous versions of JBoss included a scripts (like jboss_init_redhat.sh) that could be copied to /etc/init.d in order to add it as a service - so it would star

12条回答
  •  执念已碎
    2020-12-12 12:30

    To print PID of command executed use shell variable $!. This variable will print PID of process executed.

    case "$1" in
        start)
            echo "Starting JBoss AS 7.0.0"
            su --session-command "${JBOSS_HOME}/bin/standalone.sh >& /dev/null &" jboss
            echo $! > /tmp/jboss.pid
        ;;
    

提交回复
热议问题