aboutsummaryrefslogtreecommitdiffstats
path: root/net/cvsync/files/cvsyncd.sh
blob: 4f467f6c824a8e677ac2712cd0432d4fe1db4a57 (plain) (blame)
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
35
36
37
38
39
40
41
42
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: cvsyncd
# REQUIRE: LOGIN
#
cvsyncd_enable=${cvsyncd_enable-"NO"}
cvsyncd_pidfile=${cvsyncd_pidfile-"/var/run/cvsyncd.pid"}
cvsyncd_conffile=${cvsyncd_conffile-"%%PREFIX%%/etc/cvsyncd.conf"}

. %%RC_SUBR%%

name=cvsyncd
rcvar=`set_rcvar`
command=%%PREFIX%%/bin/${name}

load_rc_config ${name}

case "${cvsyncd_flags}" in
*-p\ *)
    echo "Warning: \$cvsyncd_flags includes -p option." \
        "Please use \$cvsyncd_pidfile instead."
    ;;
*)
    cvsyncd_flags="-p ${cvsyncd_pidfile} ${cvsyncd_flags}" ;;
esac

case "${cvsyncd_flags}" in
*-c\ *)
    echo "Warning: \$cvsyncd_flags includes -c option." \
        "Please use \$cvsyncd_conffile instead."
    ;;
*)
    cvsyncd_flags="-c ${cvsyncd_conffile} ${cvsyncd_flags}" ;;
esac

pidfile=${cvsyncd_pidfile}
required_files=${cvsyncd_conffile}

run_rc_command "$1"