#!/bin/sh
#
# Satellite example script
# ------------------------
#
# You will probably want to modify this script for your needs.
#
# Add any client tokens you want to be notified of to /etc/satwatch
# - 1 per line.
#
# "root" will be notified when a client is in the satwatch list
# or sends a message.
# 

TOKEN="$1"
ADDR=$2
MSG="$3"
# The message is intended for information only. Don't use it as a
# "remote execution" feature.

[ "`/bin/grep ^${TOKEN}$ /etc/satwatch`" -o "$MSG" ] && write root << EOM
Client detected
Site: $TOKEN
Address: $2
Message: $3
EOM
