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.
 

19 lines
430 B

[Unit]
Description=Network interface with static IPv4 (%i)
After=network.target
[Service]
Type=oneshot
RemainAfterExit=yes
EnvironmentFile=/etc/snic/snic-%i.conf
ExecStart=/usr/bin/ip link set %i up
ExecStart=/usr/bin/ip addr flush dev %i
ExecStart=/usr/bin/ip addr add ${snic_sta_addr}/${snic_sta_mask} dev %i
ExecStop=/usr/bin/ip addr flush dev %i
ExecStop=/usr/bin/ip link set %i down
[Install]
WantedBy=multi-user.target