glassfish4系統啓動腳本

glassfish4系統啓動腳本,你就是使用如下方式啓動:


$ service glassfish start



啓動腳本

  • 啓動glassfish4的文件實例 :

set -e
ASADMIN=/usr/local/glassfish4/bin/asadmin
case "$1" in
start)
        echo -n "Starting GlassFish server: glassfish"
        # Increase file descriptor limit:
        ulimit -n 32768
        # Allow "memory overcommit":
        # (basically, this allows to run exec() calls from inside the
        # app, without the Unix fork() call physically hogging 2X
        # the amount of memory glassfish is already using)
        echo 1 > /proc/sys/vm/overcommit_memory

        #echo
        #echo "GLASSFISH IS UNDER MAINTENANCE;"
        #echo "PLEASE DO NOT USE service init script."
        #echo
                LANG=en_US.UTF-8; export LANG
        $ASADMIN start-domain domain1
        echo "."
        ;;
          stop)
        echo -n "Stopping GlassFish server: glassfish"
        #echo
        #echo "GLASSFISH IS UNDER MAINTENANCE;"
        #echo "PLEASE DO NOT USE service init script."
        #echo

        $ASADMIN stop-domain domain1
        echo "."
        ;;

          *)
        echo "Usage: /etc/init.d/glassfish {start|stop}"
        exit 1
        esac
exit 0



發佈了45 篇原創文章 · 獲贊 68 · 訪問量 41萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章