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