First pass
This commit is contained in:
20
rc.d/ntfy-client
Normal file
20
rc.d/ntfy-client
Normal 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"
|
||||
Reference in New Issue
Block a user