linux下tomat自启动
#!/bin/bash# Comments to support LSB init script conventions### BEGIN INIT INFO# Provides: tomcat# Required-Start: $ALL# Required-Stop: $ALL# Default-Start: 2 3 4 5# Default-Stop: 0 1 6# Short-Description: start and stop ORS# Description: tomcat ORS SERVER### END INIT INFOexport JAVA_HOME=/usr/soft/jdk1.6.0_26case $1 in 'start') echo -n "Starting tomcat..." /usr/tomcat7/tomcat/bin/startup.sh echo " done" ;; 'stop') echo -n "Stopping tomcat..." /usr/tomcat7/tomcat/bin/shutdown.sh echo " done" ;; 'restart') /usr/tomcat7/tomcat/bin/shutdown.sh sleep 5 /usr/tomcat7/tomcat/bin/startup.sh ;; *) echo -n "Usage: $0 {start|restart|stop}" ;; esac
页:
[1]