分类: LINUX
2014-02-25 17:05:41
vi /etc/rc.d/init.d/svnd
|
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
27
28
29
30
31
32
33
34
|
#!/bin/bash
# Init file for Svn server daemon
#
# chkconfig: 2345 80 25
# description: SVNserver server daemon
#
# processname: svnd
SVN_HOME=/usr/bin
SVN_REPOS=/data/www/svn
if [ ! -f "$SVN_HOME/svnserve" ]
then
echo "svnserver startup: cannot start"
exit
fi
case "$1" in
start)
echo "Starting svnserve..."
$SVN_HOME/svnserve -d -r $SVN_REPOS
echo "Finished!"
;;
stop)
echo "Stoping svnserve..."
killall svnserve
echo "Finished!"
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: svn { start | stop | restart } "
exit 1
esac
添加到启动 update-rc.d svnd defaults |