binutils: fix default
[openadk.git] / package / subversion / files / svnserve.init
blob40ef539f079802aeeeab36d8b727a8518d74c50b
1 #!/bin/sh
2 #PKG subversion
3 #INIT 80
4 . /etc/rc.conf
6 case $1 in
7 autostop) ;;
8 autostart)
9 test x"${svnserve:-NO}" = x"NO" && exit 0
10 test x"$svnserve" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start
11 exec sh $0 start
13 start)
14 if [[ ! -d $svnserve_path ]]; then
15 echo "The subversion repository ($svnserve_path) does not exist."
16 echo "Create a new repository and/or change the path in /etc/rc.conf"
17 echo
18 echo "Create a new subversion repository with:"
19 echo " mkdir -p $svnserve_path"
20 echo " svnadmin create --fs-type fsfs $svnserve_path"
21 echo
22 exit 1
25 /usr/bin/svnserve -d -r $svnserve_path
27 stop)
28 kill $(pgrep -f /usr/bin/svnserve)
30 restart)
31 sh $0 stop
32 sh $0 start
35 echo "Usage: $0 {start|stop|restart}"
37 esac
38 exit $?