#!/bin/sh
ctl=""

if [ -z "${ctl}" ] && [ -e "instancectl" ]; then
    ctl="./instancectl"
fi

if [ -z "${ctl}" ] && [ -e "loop-httpsearch" ]; then
    ctl="./loop-httpsearch"
fi

if [ -z "${ctl}" ]; then
    echo "Error: can not locate instancectl" >&2
    exit 30 # Exit code UNKNOWN, check ISS docs
fi

exec "${ctl}" notify --updates $@

