#!/bin/sh

if [ $# = 0 ]
then
    host=`hostname`
else
    host=$1
    shift
fi

if [ $# = 0 ]
then
    port=4201
else
    port=$1
fi

echo "shutdown" | qtelnet $host $port
