#!/bin/sh
XINETD_FILE=/etc/xinetd.d/swat
touch $XINETD_FILE

cat << EOF > $XINETD_FILE

service swat

{

        port                    = 901
        socket_type             = stream
        wait                    = no
        user                    = root
        only_from               = 127.0.0.1 192.168.2.0
        server                  = /usr/sbin/swat
        server_args             = -s /usr/lib/smb.conf
        # tell it where smb.conf is stashed if non standard
        log_on_failure          += USERID
        disable                 = no

}
EOF