#!/sbin/openrc-run

name="addrwatch-mysql"
description="addrwatch mysql output module"

: ${command_user:="addrwatch"}
: ${error_logger="logger -t addrwatch-mysql -p daemon.err >/dev/null 2>&1"}

command="/usr/bin/addrwatch_mysql"
command_args="--foreground ${cfgfile:+"--config=$cfgfile"} ${table_prefix:+"--prefix=$table_prefix"}"
command_background="yes"
pidfile="/run/$RC_SVCNAME.pid"

depend() {
	need addrwatch
	use mariadb mysql net
}
