aboutsummaryrefslogtreecommitdiff
path: root/sysutils/rsyncmanager/files/rsyncmanager.in
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/rsyncmanager/files/rsyncmanager.in')
-rw-r--r--sysutils/rsyncmanager/files/rsyncmanager.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/sysutils/rsyncmanager/files/rsyncmanager.in b/sysutils/rsyncmanager/files/rsyncmanager.in
new file mode 100644
index 000000000000..d9794e730527
--- /dev/null
+++ b/sysutils/rsyncmanager/files/rsyncmanager.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# $FreeBSD$
+#
+# PROVIDE: rsyncmanager
+# REQUIRE: DAEMON
+#
+# Add the following line to /etc/rc.conf to enable rsyncmanager:
+# rsyncmanager_enable (bool): Set to "NO" by default.
+# Set it to "YES" to enable rsyncmanager
+# rsyncmanager_flags (str): Set to "-C -c %%PREFIX%%/etc/rsyncmanager.conf" by default.
+# Extra flags passed to start command
+
+. /etc/rc.subr
+
+name="rsyncmanager"
+rcvar=rsyncmanager_enable
+
+command="%%PREFIX%%/bin/rsyncmanager.rb"
+pidfile="/var/run/rsyncmanager.pid"
+command_interpreter="%%RUBY_WITHOUT_SUFFIX%%"
+required_files=%%PREFIX%%/etc/rsyncmanager.xml
+
+[ -z "$rsyncmanager_enable" ] && rsyncmanager_enable="NO"
+[ -z "$rsyncmanager_flags" ] && rsyncmanager_flags="-c %%PREFIX%%/etc/rsyncmanager.xml"
+
+load_rc_config $name
+
+extra_commands="reload"
+run_rc_command "$1"