# projects-by-ac/dynamic-to-static-ip architecture

> Architecture diagram of the GitHub repository projects-by-ac/dynamic-to-static-ip, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-11). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/projects-by-ac/dynamic-to-static-ip
- Repository: https://github.com/projects-by-ac/dynamic-to-static-ip

## Overview

This is a small interactive Bash utility for converting an Ubuntu Server 24.04 network configuration from DHCP to a static IP. The user runs the script, reviews detected settings, supplies new values, and chooses whether to apply them; declining restores the original Netplan configuration. The README documents the workflow, but no source excerpt was available, so the relationships below reflect documented behavior only.

Main entry points: [`static-ip.sh`](https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh) (Setup walkthrough)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("Administrator"))
node_script["Setup walkthrough<br/>[static-ip.sh]"]
node_detect["Interface detection<br/>[static-ip.sh]"]
node_settings["Current settings<br/>[static-ip.sh]"]
node_inputs["Static values<br/>[static-ip.sh]"]
node_backup["Netplan backup<br/>[static-ip.sh]"]
node_generate["Config generation<br/>[static-ip.sh]"]
node_decision["Apply confirmation<br/>[static-ip.sh]"]
node_apply["Apply configuration<br/>[static-ip.sh]"]
node_revert["Restore configuration<br/>[static-ip.sh]"]
node_network["Ubuntu networking"]
node_netplan["Netplan config file"]

node_user -->|"runs"| node_script
node_script -->|"detects interface"| node_detect
node_script -->|"retrieves settings"| node_settings
node_script -->|"prompts for values"| node_inputs
node_script -->|"backs up"| node_backup
node_script -->|"generates config"| node_generate
node_script -->|"prompts decision"| node_decision
node_detect -->|"identifies interface"| node_network
node_settings -->|"reads settings"| node_network
node_backup -->|"backs up"| node_netplan
node_generate -->|"writes config"| node_netplan
node_decision -->|"confirm applies"| node_apply
node_decision -->|"decline restores"| node_revert
node_apply -->|"applies config"| node_network
node_revert -->|"restores backup"| node_netplan

click node_script "https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh"
click node_detect "https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh"
click node_settings "https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh"
click node_inputs "https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh"
click node_backup "https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh"
click node_generate "https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh"
click node_decision "https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh"
click node_apply "https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh"
click node_revert "https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_user,node_network,node_netplan toneIndigo
class node_script,node_detect,node_settings,node_inputs,node_backup,node_generate,node_decision,node_apply,node_revert toneTeal
```

## Components

### Other components

- **Administrator**
- [Setup walkthrough](https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh): `static-ip.sh`
- [Interface detection](https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh): `static-ip.sh`
- [Current settings](https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh): `static-ip.sh`
- [Static values](https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh): `static-ip.sh`
- [Netplan backup](https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh): `static-ip.sh`
- [Config generation](https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh): `static-ip.sh`
- [Apply confirmation](https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh): `static-ip.sh`
- [Apply configuration](https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh): `static-ip.sh`
- [Restore configuration](https://github.com/projects-by-ac/dynamic-to-static-ip/blob/main/static-ip.sh): `static-ip.sh`
- **Ubuntu networking**
- **Netplan config file**

## Connections

- Administrator → Setup walkthrough: runs (evidence: `README.md`)
- Setup walkthrough → Interface detection: detects interface (evidence: `README.md`)
- Setup walkthrough → Current settings: retrieves settings (evidence: `README.md`)
- Setup walkthrough → Static values: prompts for values (evidence: `README.md`)
- Setup walkthrough → Netplan backup: backs up (evidence: `README.md`)
- Setup walkthrough → Config generation: generates config (evidence: `README.md`)
- Setup walkthrough → Apply confirmation: prompts decision (evidence: `README.md`)
- Interface detection → Ubuntu networking: identifies interface (evidence: `README.md`)
- Current settings → Ubuntu networking: reads settings (evidence: `README.md`)
- Netplan backup → Netplan config file: backs up (evidence: `README.md`)
- Config generation → Netplan config file: writes config (evidence: `README.md`)
- Apply confirmation → Apply configuration: confirm applies (evidence: `README.md`)
- Apply confirmation → Restore configuration: decline restores (evidence: `README.md`)
- Apply configuration → Ubuntu networking: applies config (evidence: `README.md`)
- Restore configuration → Netplan config file: restores backup (evidence: `README.md`)
