First pass

This commit is contained in:
2025-05-31 21:03:25 -05:00
parent 54c9beef73
commit b31d824059
8 changed files with 505 additions and 2 deletions

20
rc.d/ntfy Normal file
View File

@ -0,0 +1,20 @@
#!/bin/sh
#
# PROVIDE: ntfy
# REQUIRE: networking
# KEYWORD:
. /etc/rc.subr
name="ntfy"
rcvar="ntfy_enable"
ntfy_user="ntfy"
ntfy_command="/usr/local/bin/ntfy serve --config /usr/local/etc/ntfy/server.yml"
pidfile="/var/run/ntfy/${name}.pid"
command="/usr/sbin/daemon"
command_args="-P ${pidfile} -r -f ${ntfy_command}"
load_rc_config $name
: ${ntfy_enable:=no}
run_rc_command "$1"

20
rc.d/ntfy-client Normal file
View File

@ -0,0 +1,20 @@
#!/bin/sh
#
# PROVIDE: ntfy
# REQUIRE: networking
# KEYWORD:
. /etc/rc.subr
name="ntfy-client"
rcvar="ntfy-client_enable"
ntfy_user="ntfy"
ntfy_command="/usr/local/bin/ntfy subscribe --config /usr/local/etc/ntfy/client.yml --from-config"
pidfile="/var/run/ntfy/${name}-client.pid"
command="/usr/sbin/daemon"
command_args="-P ${pidfile} -r -f ${ntfy_command}"
load_rc_config $name
: ${ntfy-client_enable:=no}
run_rc_command "$1"