>> Edit article
이름
제목
패스워드
아파치 자바서블릿을 쓸 경우 데몬 재시작 하면 종종 아파치 데몬이 떠 있지 않고 죽는 경우가 있다. 고민결과 데몬을 바로 재시작 하면 stop start 바로 실행하면 데몬이 바로 시작될 경우도 있지만 종종 죽습니다. <pre> /etc/rc.d/init.d/httpd 1 #!/bin/sh 2 # 3 # Startup script for the Apache Web Server 4 # 5 # chkconfig: 345 85 15 6 # description: Apache is a World Wide Web server. 7 # processname: httpd 8 # pidfile: /var/run/httpd.pid 9 # config: /etc/httpd/conf/access.conf 10 # config: /etc/httpd/conf/httpd.conf 11 # config: /etc/httpd/conf/srm.conf 12 13 14 # Source function library. 15 . /etc/rc.d/init.d/functions 16 17 # See how we were called. 18 case "$1" in 19 start) 20 LS_COLORS="" 21 CLASSPATH="" 22 echo -n "Starting httpd: " 23 daemon httpd 24 echo 25 touch /var/lock/subsys/httpd 26 ;; 27 stop) 28 echo -n "Shutting down http: " 29 killproc httpd 30 echo 31 rm -f /var/lock/subsys/httpd 32 rm -f /var/run/httpd.pid 33 ;; 34 status) 35 status httpd 36 ;; 37 restart) 38 $0 stop <b>39 sleep 1</b> 1초 후에 시작을 하면 죽는 경우가 없더군요 40 $0 start 41 ;; 42 reload) 43 echo -n "Reloading httpd: " 44 killproc httpd -HUP 45 echo 46 ;; 47 *) 48 echo "Usage: $0 {start|stop|restart|reload|status}" 49 exit 1 50 esac 51 52 exit 0 </pre>
Copyleft
1999-2026 by
JSBoard Open Project
Theme Designed by
IDOO
All right reserved