dns/knot-resolver: Fix service status

Add status() function to rc script.

PR:		266320
Reported by:	yonas.yanfa@gmail.com
Approved by:	freebsd@dns.company (maintainer, timeout > 1 month)
This commit is contained in:
Fernando Apesteguía 2022-10-11 17:49:47 +02:00
parent 91ef273ce6
commit e2e231d0b5

View file

@ -62,4 +62,14 @@ kresd_stop() {
fi
}
kresd_status() {
if [ -e "${pidfile}" ]; then
echo "${name} is running on pid $(cat $pidfile)."
return 1
else
echo "${name} is not running."
return 0
fi
}
run_rc_command "$1"