# TODO: split into separate smbd/nmbd?
check process smbd with pidfile /var/lock/smbd.pid
	group fileserver
	group samba
	start program = "/sbin/service smb start"
	stop  program = "/sbin/service smb stop"
	if failed host localhost port 139 type tcp then restart
	if 5 restarts with 5 cycles then timeout
	depend on smbd_bin
	depend on samba_rc

check process nmbd with pidfile /var/lock/nmbd.pid
	group fileserver
	group samba
	start program = "/sbin/service smb start"
	stop  program = "/sbin/service smb stop"
	if failed host localhost port 137 type udp then restart
	if failed host localhost port 138 type udp then restart
	if 5 restarts with 5 cycles then timeout
	depend on nmbd_bin
	depend on samba_rc

check file smbd_bin with path /usr/sbin/smbd
	group samba
	include /etc/monitrc.d/templates/rootbin
	
check file nmbd_bin with path /usr/sbin/nmbd
	group samba
	include /etc/monitrc.d/templates/rootbin
	
check file samba_rc with path /etc/samba/smb.conf
	group samba
	include /etc/monitrc.d/templates/rootrc
