#!/bin/sh
#
# PROVIDE: netbird
# REQUIRE: SERVERS
# KEYWORD: shutdown
#

. /etc/rc.subr

name="netbird"
netbird_env="IS_DAEMON=1"
pidfile="/var/run/${name}.pid"
command="/usr/sbin/daemon"
daemon_args="-P ${pidfile} -r -t \"${name}: daemon\""
command_args="${daemon_args} /usr/local/bin/netbird service run --config /var/db/netbird/config.json --log-level info --daemon-addr unix:///var/run/netbird.sock --log-file /var/log/netbird/client.log"

run_rc_command "$1"

