#!/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"