preparation-scripts/installation/static_ip.sh

12 lines
240 B
Bash
Raw Normal View History

2024-11-18 20:56:39 +01:00
#!/bin/bash
config="auto $1
iface $1 inet static
2024-11-18 21:25:26 +01:00
address 192.168.16.1
2024-11-21 16:30:21 +01:00
netmask 255.255.255.0
dns-nameservers 192.168.16.1"
2024-11-18 20:56:39 +01:00
2024-11-18 20:58:55 +01:00
echo -e "$config" | sudo tee /etc/network/interfaces.d/network >/dev/null
2024-11-18 21:05:35 +01:00
systemctl restart networking