#!/bin/bash ip addr | grep -q '10.10.10.2' \ && echo '{"text":"Connected","class":"connected","percentage":100}' \ || echo '{"text":"Disconnected","class":"disconnected","percentage":0}'