preparation-scripts/installation/static_ip.sh
2024-11-18 21:05:35 +01:00

11 lines
230 B
Bash
Executable file

#!/bin/bash
config="auto $1
iface $1 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.0"
echo -e "$config" | sudo tee /etc/network/interfaces.d/network >/dev/null
systemctl restart networking