weerok

proxmox network restart without reboot

May 19th, 2018
295
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.47 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo ==== Proxmox Network-tap-ssh RESTART
  4. brctl show | grep 'vmbr' | awk '{print $1}' | while read line
  5. do
  6. >$line
  7. brctl show $line | egrep -v 'bridge name|vmbr' | awk {'print $1'} >> $line
  8. done
  9.  
  10. /etc/init.d/networking stop && /etc/init.d/networking start
  11.  
  12. ls |grep vmbr | while read line
  13. do
  14. input="$line"
  15. while IFS=',' read -r f1 f2 f3 f4 f5 f6 f7 f8 f9 f10
  16. do
  17. ip link set dev $f1 $f2 $f3 $f4 $f5 $f6 $f7 $f8 $f9 master "$input"
  18. done < "$input"
  19. done
Advertisement
Add Comment
Please, Sign In to add comment