Fedora 14下subversion开机自动启动配置
在Fedora14了安装了subversion,不想直接简单的写到启动脚本里启动,于是google到下面的脚本了,毕竟用chkconfig和service命令更方便。
本脚本能让subversion作为一个守护进程启动。
vi/etc/init.d/subversion
#!/bin/bash # # /etc/rc.d/init.d/subversion # # Starts the Subversion Daemon # # chkconfig: 2345 90 10 # description: Subversion Daemon # processname: svnserve source /etc/rc.d/init.d/functions [ -x /usr/bin/svnserve ] || exit 1 ### Default variables SYSCONFIG="/etc/sysconfig/subversion" ### Read configuration [ -r "$SYSCONFIG" ] && source "$SYSCONFIG" RETVAL=0 prog="svnserve" desc="Subversion Daemon" start() { echo -n $"Starting $desc ($prog): " daemon $prog -d $OPTIONS RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog echo } stop() { echo -n $"Shutting down $desc ($prog): " killproc $prog RETVAL=$? [ $RETVAL -eq 0 ] && success || failure echo [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog return $RETVAL } case "$1" in start) start ;; stop) stop ;; restart) stop start RETVAL=$? ;; condrestart) [ -e /var/lock/subsys/$prog ] && restart RETVAL=$? ;; *) echo $"Usage: $0 { start|stop|restart|condrestart }" RETVAL=1 esac exit $RETVAL
vi/etc/sysconfig/subversion
# Configuration file for the Subversion service # # To pass additional options (for instace, -r root of directory to server) to # the svnserve binary at startup, set OPTIONS here. # #OPTIONS= OPTIONS="--threads --root /var/svn"
*subversion守护进程的选项,比如'--root<版本库的路径>',可以在'/etc/sysconfig/subversion'文件里设置。
*以root帐户执行:'chmod+x'/etc/init.d/subversion'
*以root帐户执行:'chkconfig--addsubversion&&chkconfigsubversionon'
*以root帐户执行:'servicesubversionstart'
相关推荐
起点 2020-05-05
catchupwith 2008-05-03
ISEESTARS 2008-03-15
wwwwwwwwwwwwdi 2008-02-16
ouhzrM 2008-01-20
datouniao 2007-09-04
zhaohuan 2011-08-06
renkai 2011-07-18
Gsdxiaohei 2011-05-06
半路出家的justow 2011-02-26
85261748 2010-09-12
sanmu 2010-07-25
85530494 2010-05-03
我是Mark 2009-10-02
半路出家的justow 2009-07-04
lyonte 2009-05-01
xianhe0 2009-02-21
guowang0 2008-11-13