*부팅시 리눅스에 서비스 등록방법
//standalone 방식
#cd /etc/init.d
#cp sshd new (sshd의 형식에서 고쳐서 실습)
#vi new
-----------------------------------new----------------------------------
#!/bin/bash
#
# chkconfig: 2345 55 25 (2,3,4,5 런레벨, S55new, K25new)
# description: Test Script
#
case "$1" in
start)
echo 1111 > /test/echo.start
echo "[ OK ] start"
;;
stop)
echo 2222 > /test/echo.stop
echo "[ OK ] stop"
;;
restart)
echo 2222 > /test/echo.stop
echo "[ OK ] stop"
echo 1111 > /test/echo.start
echo "[ OK ] start"
;;
*)
echo $"Usage: $0 {start|stop|restart}"
RETVAL=1
esac
exit $RETVAL
--------------------------------------------------------------------
테스트를 해본다