게시물 261건
   
[redhat6.7] init.d에 자동 실행 등록하기 [ chkconfig ]
글쓴이 : theko 날짜 : 2017-01-12 (목) 17:21 조회 : 3268
#!/bin/bash
# chkconfig: 2345 91 90       // 91은  chkconfig add 시 시작할때 넘버 90은 죽어있을때 넘버
# description: test service     // 여기까지 세줄은 꼭넣어줘야 함
case "$1" in
        start)
        touch /root/theko.deamon
        ;;
        stop)
        rm -rf /root/theko.deamon
        ;;
        *)
                echo "Usage {start|stop}"
        exit 1
        ;;
esac
exit 0

# chmod 755 theko
# mv theko /etc/init.d/

# chkconfig --add theko
# chkconfig theko  on




이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com