aboutsummaryrefslogtreecommitdiff
path: root/net/cvsync/files/cvsyncd.in
diff options
context:
space:
mode:
Diffstat (limited to 'net/cvsync/files/cvsyncd.in')
-rw-r--r--net/cvsync/files/cvsyncd.in43
1 files changed, 43 insertions, 0 deletions
diff --git a/net/cvsync/files/cvsyncd.in b/net/cvsync/files/cvsyncd.in
new file mode 100644
index 000000000000..ddfba1de8b8b
--- /dev/null
+++ b/net/cvsync/files/cvsyncd.in
@@ -0,0 +1,43 @@
+#!/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"