서버 재시작시 redmine 자동시작 스크립트

 

서버 재시작시 redmine 자동시작 스크립트

1. init.d에 redmine 스크립트 작성

]# vi /etc/init.d/redmine
#!/bin/bash
# redmine

case "$1" in
start)
echo -n "Starting redmine: "
/home/redmine-1.0.3-0/ctlscript.sh start
echo
;;
stop)
echo -n "Shutting down redmine : "
/home/redmine-1.0.3-0/ctlscript.sh stop
echo
;;
restart)
echo -n "Restarting redmine : "
/home/redmine-1.0.3-0/ctlscript.sh restart
echo
;;
*)
echo "Usage : $0 {start|stop|restart}"
exit 1
esac

exit 0

2. 스크립트가 정상동작 하는지 확인

]# /etc/init.d/redmine stop
]# /etc/init.d/redmine start
]# /etc/init.d/redmine restart

3. 링크 걸기

]# cd /etc/rc.d/rc0.d
]# ln -s ../init.d/redmine K14redmine 
]# cd /etc/rc.d/rc3.d
]# ln -s ../init.d/redmine S90redmine

 

This entry was posted in SCM/ITS, System and tagged , , . Bookmark the permalink.

댓글 남기기