New backup 2026-01-03 13:30:02
This commit is contained in:
parent
34778cb693
commit
4f8b2b1b02
1 changed files with 4 additions and 1 deletions
|
|
@ -3,12 +3,15 @@
|
|||
|
||||
function ifstatus(){
|
||||
# nmcli --terse -f NAME,TYPE,AUTOCONNECT,AUTOCONNECT-PRIORITY,ACTIVE,DEVICE,STATE connection show | column -t --table-columns name,type,autoconnect,priority,active,device,state -s ':' -J | jq '.' #jq -c '.'
|
||||
jq -s '.[0] * .[1]' <<<$(nmcli --terse -f DEVICE d s | column -t -n 'devices' --table-columns device -s ':' -J;nmcli --terse -f NAME c s | column -t -n 'connections' --table-columns name -s ':' -J)
|
||||
# jq -s '.[0] * .[1]' <<<$(nmcli --terse -f DEVICE d s | column -t -n 'devices' --table-columns device -s ':' -J;nmcli --terse -f NAME c s | column -t -n 'connections' --table-columns name -s ':' -J)
|
||||
jq -c '[ .devices[] | select((.type=="wifi") or (.type=="ethernet")) ]' <<<$(nmcli --terse -f DEVICE,TYPE,STATE,CONNECTION d s | column -t -n 'devices' --table-columns device,type,state,connection -s ':' -J)
|
||||
# jq '.table.[] | select(.type=="vpn")'
|
||||
}
|
||||
|
||||
ifstatus
|
||||
|
||||
exit 1
|
||||
|
||||
ip monitor address | {
|
||||
while read -r event; do
|
||||
ifstatus
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue