Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- echo $( date )
- for my_iface in wan lan vpn_turris guest_turris radio0 radio1
- do echo -n "Interface: $my_iface "
- case $my_iface in
- radio0) iface_status=$( wifi status | grep -i '"up":' | head -1 | sed -e 's/^.*: //' -e 's/,$//' )
- ;;
- radio1) iface_status=$( wifi status | grep -i '"up":' | tail -1 | sed -e 's/^.*: //' -e 's/,$//' )
- ;;
- *) iface_status=$( ifstatus $my_iface | grep -i '"up":' | sed -e 's/^.*: //' -e 's/,$//' )
- ;;
- esac
- if [[ $iface_status == "false" ]] ; then echo " [ DOWN ]" ; else echo " [ UP ]" ; fi
- done
- echo $( date )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement