Settings for checking a SAMBA server

Paul Cochrane paul at tortc.tuht.scot.nhs.uk
Fri Aug 23 12:33:12 CEST 2002


Hi folks.

I thought I'd pass on the setup I am using to check wether a samba server is 
running on a host:

in checkcommands.cfg:
------------------------------------------------------------
define command {
command_name                   check_samba
command_line                   $USER1$/check_samba $ARG1$ $HOSTADDRESS$
}
------------------------------------------------------------


The check_samba script is as such:
------------------------------------------------------------
#!/bin/sh
#
/usr/local/samba/bin/smbclient -W $1  -L $2  -N >/dev/null
if test $? -eq 0
then
        echo "$1\\$2 answered SAMBA request"
        exit 0
else
        echo "$1\\$2 not responding to SAMBA requests"
        exit 1
fi
------------------------------------------------------------


                       -------------------------------------
Paul Cochrane         |       Tayside Orthopaedic &         |
                      | Rehabilitation Technology Centre    |
=============         |-------------------------------------|
                      | Ninewells Hospital & Med. School    | 
                      | Dundee, Scotland, UK.               |
                      | DD1 9SY.                            |
                      | Phone:  +44 1382 496284             |
                      | Fax:    +44 1382 496322             |
                      | E-Mail: paul at tortc.tuht.scot.nhs.uk |
                       -------------------------------------



-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390




More information about the Users mailing list