Toggle between client and router mode on network interface (Linux)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
359 B

6 years ago
  1. [Unit]
  2. Description=Network interface with dynamic IPv4 (%i)
  3. After=network.target
  4. [Service]
  5. Type=oneshot
  6. RemainAfterExit=yes
  7. EnvironmentFile=/etc/snic/snic-%i.conf
  8. ExecStart=/usr/bin/ip link set %i up
  9. ExecStart=/usr/bin/ip addr flush dev %i
  10. ExecStop=/usr/bin/ip addr flush dev %i
  11. ExecStop=/usr/bin/ip link set %i down
  12. [Install]
  13. WantedBy=multi-user.target