|
@@ -9,9 +9,9 @@ sudo touch /etc/netplan/01-netcfg.yaml
|
|
|
# Ask for input on network configuration
|
|
# Ask for input on network configuration
|
|
|
read -p "Enter the static IP of the server in CIDR notation: " staticip
|
|
read -p "Enter the static IP of the server in CIDR notation: " staticip
|
|
|
read -p "Enter the IP of your gateway: " gatewayip
|
|
read -p "Enter the IP of your gateway: " gatewayip
|
|
|
-read -p "Enter the IP of DNS Server 1" DNS1
|
|
|
|
|
-read -p "Enter the IP of DNS Server 2" DNS2
|
|
|
|
|
-read -p "Enter the name of the seach domain" domain
|
|
|
|
|
|
|
+read -p "Enter the IP of DNS Server 1:" DNS1
|
|
|
|
|
+read -p "Enter the IP of DNS Server 2:" DNS2
|
|
|
|
|
+read -p "Enter the name of the seach domain:" domain
|
|
|
echo
|
|
echo
|
|
|
cat > /etc/netplan/01-netcfg.yaml <<EOF
|
|
cat > /etc/netplan/01-netcfg.yaml <<EOF
|
|
|
network:
|
|
network:
|
|
@@ -23,7 +23,7 @@ network:
|
|
|
- $staticip
|
|
- $staticip
|
|
|
gateway4: $gatewayip
|
|
gateway4: $gatewayip
|
|
|
nameservers:
|
|
nameservers:
|
|
|
- addresses:
|
|
|
|
|
|
|
+ addresses:
|
|
|
- $DNS1
|
|
- $DNS1
|
|
|
- $DNS2
|
|
- $DNS2
|
|
|
search:
|
|
search:
|