#!/bin/sh
# $Id: ups,v 1.2 2014/04/25 19:44:02 friedman Exp $

# Talk to apcupsd daemon

printf "\0\6status" | nc -4 ${1-localhost} 3551 | sed -e 's/^..//'
