constantin-net

netmenu_off

Sep 17th, 2020
940
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. [ -z "$1" ] && echo "iface" && exit 0
  4.  
  5. if [[ -z `cat /etc/network/interfaces | grep $1` ]]; then
  6.   dhclient $1 -r
  7. #  dhclient -x -v
  8.   ifconfig $1 down
  9. else
  10.   ifdown $1
  11. fi
  12. exit 0
RAW Paste Data