#!/bin/bash
MACHINEID=$1
PORTNUMBER=$2
HTMLFILE=$3
HTMLFILETMP=$3.tmp
if [ -z $HTMLFILE ] ; then
    cat <<EOF
$0 serveraddress portnumber outputhtmlfile
    creates an html output from the information obtained from the 
    server on outputhtmlfile, and renews the information every 5 seconds.
EOF
    exit 1
fi
while true; do dmachinemon-htmloutput -p $MACHINEID -c $PORTNUMBER > $HTMLFILETMP && mv $HTMLFILETMP $HTMLFILE; sleep 5s ; done

