本文共 1193 字,大约阅读时间需要 3 分钟。
resin启动脚本:#!/bin/sh## Linux startup script for Resin# chkconfig: 345 86 16# description: Resin is a Java Web server.# processname: wrapper.pl## To install, configure this file as needed and copy init.resin# to /etc/rc.d/init.d as resin. Then use "# /sbin/chkconfig resin reset"#. /etc/profile. /etc/init.d/functionsStartPath='/application/resin/bin/httpd.sh'Resinlog='/app/log/resinlog'Port=(8080 6911 6921)[ ! -d $Resinlog ] && mkdir -p $Resinlogresind(){ for id in test do $StartPath -server $id $1 >>$Resinlog/resin_startup.log if [ $? -eq 0 ];then action "$1 $id resin ..." /bin/true else action "$1 $id resin ..." /bin/false fi done}case $1 in start) resind $1 2>&1 /dev/null echo "------------check ing------------" sleep 12 for n in ${Port[*]} do netstat -lnput|grep $n --color done echo "------------check ing------------" ;; stop) resind $1 ;; restart) resind stop sleep 2 resind start ;; *) echp "Usage: $0 {start|stop|restart}" exit 1esac
转载于:https://blog.51cto.com/zhagyilig/1880546