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/functions StartPath=‘/application/resin/bin/httpd.sh‘ Resinlog=‘/app/log/resinlog‘ Port=(8080 6911 6921) [ ! -d $Resinlog ] && mkdir -p $Resinlog resind(){ 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 1 esac
时间: 2024-10-13 01:58:40