summary refs log tree commit diff
path: root/FreeBSD
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-08-15 17:40:08 -0400
committerJune McEnroe <june@causal.agency>2020-08-15 17:40:17 -0400
commitf67269202ef1bdb0e7b91aaa1d2799a9bc35ac73 (patch)
tree8267137124a3b64798b4c353f580c85872d03a0e /FreeBSD
parentCall setproctitle with number of services (diff)
downloadcatsit-f67269202ef1bdb0e7b91aaa1d2799a9bc35ac73.tar.gz
catsit-f67269202ef1bdb0e7b91aaa1d2799a9bc35ac73.zip
Add FreeBSD rc script
I'm expecting to also have an OpenBSD rc script.
Diffstat (limited to 'FreeBSD')
-rw-r--r--FreeBSD/catsitd.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/FreeBSD/catsitd.in b/FreeBSD/catsitd.in
new file mode 100644
index 0000000..7dfa8a8
--- /dev/null
+++ b/FreeBSD/catsitd.in
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# PROVIDE: catsitd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name="catsitd"
+rcvar="${name}_enable"
+extra_commands="reload"
+
+load_rc_config $name
+
+: ${catsitd_enable:="NO"}
+
+command="%%PREFIX%%/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+command_args="-p ${pidfile}"
+
+run_rc_command "$1"