summary refs log tree commit diff
path: root/etc
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-08-28 23:59:48 -0400
committerJune McEnroe <june@causal.agency>2019-08-28 23:59:48 -0400
commit7a67689cfdbc2f7b487dc3e5e020dee33334b583 (patch)
tree3c09bb6667f0127ecbcc9fb71101bc7ee87901aa /etc
parentAdd Birds Contending (diff)
downloadsrc-7a67689cfdbc2f7b487dc3e5e020dee33334b583.tar.gz
src-7a67689cfdbc2f7b487dc3e5e020dee33334b583.zip
Add samba_mdns rc script
Diffstat (limited to 'etc')
-rw-r--r--etc/samba_mdns26
1 files changed, 26 insertions, 0 deletions
diff --git a/etc/samba_mdns b/etc/samba_mdns
new file mode 100644
index 00000000..66b13af7
--- /dev/null
+++ b/etc/samba_mdns
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+# PROVIDE: samba_mdns
+# REQUIRE: samba_server mdnsd
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name="samba_mdns"
+rcvar="samba_mdns_enable"
+
+load_rc_config $name
+
+: ${samba_mdns_enable:="NO"}
+: ${samba_mdns_name:="${hostname}"}
+: ${samba_mdns_port:="445"}
+: ${samba_mdns_text:=""}
+
+procname="/usr/local/sbin/mdnsctl"
+command="/usr/sbin/daemon"
+pidfile="/var/run/${name}.pid"
+
+publish_args="${samba_mdns_name} smb tcp ${samba_mdns_port} '${samba_mdns_text}'"
+command_args="-T mdnsctl -p ${pidfile} -- ${procname} publish ${publish_args}"
+
+run_rc_command "$1"
logheader'>2021-01-12Split fields by tab onlyJune McEnroe Also don't fail hard on non-forward-search definitions. 2021-01-12List both Makefile and html.sh under README.7June McEnroe 2021-01-12Add htagml exampleJune McEnroe 2021-01-12Use mandoc and htagml for bin htmlJune McEnroe 2021-01-12Add htagmlJune McEnroe 2021-01-12Replace causal.agency with a simple mdoc pageJune McEnroe 2021-01-11Publish "Using vi"June McEnroe 2021-01-11Enable diff.colorMovedJune McEnroe 2021-01-10Set less search case-insensitiveJune McEnroe 2021-01-10Set EXINITJune McEnroe neovim is laggy as hell in my OpenBSD VM, so I switched to vi so I could type without getting frustrated. 2021-01-09Add c -t flag to print expression typeJune McEnroe Also add missing float case. 2021-01-05Update taglineJune McEnroe