서버 재시작시 redmine 자동시작 스크립트
서버 재시작시 redmine 자동시작 스크립트 1. init.d에 redmine 스크립트 작성
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
]# 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. 스크립트가 정상동작 하는지 확인
1 2 3 |
]# /etc/init.d/redmine stop ]# /etc/init.d/redmine start ]# /etc/init.d/redmine restart |
3. 링크 걸기
1 2 3 4 |
]# cd /etc/rc.d/rc0.d ]# ln -s ../init.d/redmine K14redmine ]# cd /etc/rc.d/rc3.d ]# ln -s ../init.d/redmine S90redmine |