"
echo " | Dwarfguard server URL/IP:"
if [ -z "$g_serverurl" ] ; then
echo " | URL is empty, agent initialization is probably not yet finished."
fi
echo " | $g_serverurl>"
echo " | "
echo " |
"
echo ""
echo " | Device Dwarfguard ID:"
echo " | "
if [ -z "$g_devid" ] ; then
echo "Not registered>"
else
echo "$g_devid>"
fi
echo ">"
echo " | "
echo " | "
echo "
"
echo " Agent version:"
echo " | $AGVER>"
echo " | "
echo " | "
echo ""
echo " Agent PID:"
echo " | "
OASTR="$AGENTPID"
ASTR="$OASTR"
COLORSTYLE=""
if [[ -z "$AGENTPID" || 0 -eq "$AGENTPID" ]] ; then
COLORSTYLE="style=\"color:red\""
ASTR="Agent is not running..."
else
if [[ -n "$pcnt_errors" && "$pcnt_errors" -gt 0 ]] ; then
COLORSTYLE="style=\"color:red\""
ASTR="$ASTR, errors: $pcnt_errors"
fi
if [[ -n "$pcnt_connfails" && "$pcnt_connfails" -gt 0 ]] ; then
[ -z "$COLORSTYLE" ] && COLORSTYLE="style=\"color:orange\""
ASTR="$ASTR, connection errors: $pcnt_connfails"
fi
fi
echo "$ASTR>"
echo ">"
echo " | "
echo " | "
echo ""
echo " Next sync with server:"
if [ -n "$time_target" ] ; then
ATIME=$(date "+%T")
echo " | $time_target> (localtime is $ATIME)"
else
echo " | time is being calculated..."
fi
echo " | "
echo " | "
echo ""
echo ""
echo " Actions:"
if [ 0 -eq "$AGENTPID" ] ; then
echo "
"
else
echo "
"
fi
if [ -n "$time_target" ] ; then
echo " "
fi
echo " | "
echo "
"
echo "