about summary refs log tree commit diff
path: root/rc.d/calico
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-11-02 05:19:02 -0400
committerJune McEnroe <june@causal.agency>2019-11-02 05:19:02 -0400
commitf5eb3c5b008c044a253c0be753e9573e215d1f6c (patch)
tree2e7a4a033ce70f1c6d5c6b2acfcd78bb4380faf6 /rc.d/calico
parentApply capsicum to calico (diff)
downloadpounce-f5eb3c5b008c044a253c0be753e9573e215d1f6c.tar.gz
pounce-f5eb3c5b008c044a253c0be753e9573e215d1f6c.zip
Add calico rc script
Diffstat (limited to 'rc.d/calico')
-rw-r--r--rc.d/calico27
1 files changed, 27 insertions, 0 deletions
diff --git a/rc.d/calico b/rc.d/calico
new file mode 100644
index 0000000..583b65b
--- /dev/null
+++ b/rc.d/calico
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# PROVIDE: calico
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name='calico'
+rcvar='calico_enable'
+
+load_rc_config "${name}"
+
+: ${calico_enable:="NO"}
+
+command='/usr/sbin/daemon'
+child_command='/usr/local/bin/calico'
+pidfile="/var/run/${name}.pid"
+
+child_flags=$calico_flags
+child_user=$calico_user
+unset calico_flags calico_user
+command_args="\
+	-p ${pidfile} -T ${name} ${child_user:+-u ${child_user}} \
+	-- ${child_command} ${child_flags}"
+
+run_rc_command "$1"