summary refs log tree commit diff
path: root/rc.d/calico.in
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d/calico.in')
-rw-r--r--rc.d/calico.in30
1 files changed, 30 insertions, 0 deletions
diff --git a/rc.d/calico.in b/rc.d/calico.in
new file mode 100644
index 0000000..a54658a
--- /dev/null
+++ b/rc.d/calico.in
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# PROVIDE: calico
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name='calico'
+rcvar='calico_enable'
+
+load_rc_config "${name}"
+
+: ${calico_enable:='NO'}
+: ${calico_path:="/var/run/${name}"}
+calico_flags="${calico_flags} ${calico_path}"
+
+command='/usr/sbin/daemon'
+procname='%%PREFIX%%/bin/calico'
+pidfile="/var/run/${name}.pid"
+required_dirs=$calico_path
+
+child_flags=$calico_flags
+child_user=$calico_user
+unset calico_flags calico_user
+command_args="\
+	-p ${pidfile} -T ${name} ${child_user:+-u ${child_user}} \
+	-- ${procname} ${child_flags}"
+
+run_rc_command "$1"