feat: add support for non-interactive installation by specifying network interface via environment variable

This commit is contained in:
Jerry VDP
2026-01-17 21:48:29 +02:00
parent 5ea3368b1b
commit f5db63b626
4 changed files with 18 additions and 0 deletions

View File

@@ -34,6 +34,12 @@ Before getting started, ensure that you have:
curl -sfL https://get.quickstack.dev/setup.sh | sh -
```
**Non-interactive installation:**
If you want to skip the network interface selection prompt, you can specify the interface using the `INSTALL_K3S_INTERFACE` environment variable:
```bash
curl -sfL https://get.quickstack.dev/setup.sh | INSTALL_K3S_INTERFACE=eth0 sh -
```
Visit our [docs](https://quickstack.dev/docs/intro) for more detailed installation instructions:
## Contributing

View File

@@ -37,6 +37,10 @@ select_network_interface() {
echo "Invalid selection. Exiting."
exit 1
fi
else
selected_iface="$INSTALL_K3S_INTERFACE"
selected_ip=$(ip -o -4 addr show "$selected_iface" | awk '{print $4}' | cut -d'/' -f1)
echo "Using provided network interface: $selected_iface ($selected_ip)"
fi
echo "Using network interface: $selected_iface with IP address: $selected_ip"

View File

@@ -49,6 +49,10 @@ select_network_interface() {
echo "Invalid selection. Exiting."
exit 1
fi
else
selected_iface="$INSTALL_K3S_INTERFACE"
selected_ip=$(ip -o -4 addr show "$selected_iface" | awk '{print $4}' | cut -d'/' -f1)
echo "Using provided network interface: $selected_iface ($selected_ip)"
fi
echo "Using network interface: $selected_iface with IP address: $selected_ip"

View File

@@ -37,6 +37,10 @@ select_network_interface() {
echo "Invalid selection. Exiting."
exit 1
fi
else
selected_iface="$INSTALL_K3S_INTERFACE"
selected_ip=$(ip -o -4 addr show "$selected_iface" | awk '{print $4}' | cut -d'/' -f1)
echo "Using provided network interface: $selected_iface ($selected_ip)"
fi
echo "Using network interface: $selected_iface with IP address: $selected_ip"