# bunny2fmc - Installation Guide

## Quick Install (3 kommandoer)

```bash
sudo apt install pipx
pipx install bunny2fmc
bunny2fmc --setup
```

---

## Detaljeret Guide

### 1. Installer pipx

**Ubuntu/Debian:**
```bash
sudo apt install pipx
pipx ensurepath
```

**macOS:**
```bash
brew install pipx
pipx ensurepath
```

Åbn ny terminal efter `ensurepath`.

### 2. Installer bunny2fmc

```bash
pipx install bunny2fmc
```

### 3. Kør Setup

```bash
bunny2fmc --setup
```

Du bliver spurgt om:
- **FMC IP/hostname** - fx `192.168.1.100` eller `fmc.firma.dk`
- **FMC brugernavn** - brug `bunny2fmc_sync` (se PREINSTALL.md)
- **FMC password** - gemmes sikkert i OS keyring
- **Dynamic Object navn** - fx `Bunny-CDN-IPs`
- **IPv6** - y/n (default: n)
- **Sync interval** - minutter mellem syncs

### 4. Test

```bash
bunny2fmc --run      # Kør sync nu
bunny2fmc --logs     # Se hvad der skete
```

---

## Filplacering

Alt gemmes i `~/bunny2fmc/`:

```
~/bunny2fmc/
├── config.json     # Konfiguration
├── logs/           # Logfiler
└── guide/          # Dokumentation
```

---

## Kommandoer

| Kommando | Beskrivelse |
|----------|-------------|
| `bunny2fmc --setup` | Interaktiv opsætning |
| `bunny2fmc --run` | Kør sync nu |
| `bunny2fmc --start` | Start cron job |
| `bunny2fmc --stop` | Stop cron job |
| `bunny2fmc --config` | Vis konfiguration |
| `bunny2fmc --logs` | Vis logs |
| `bunny2fmc --help` | Alle kommandoer |

---

## Troubleshooting

**pipx ikke fundet:**
```bash
pipx ensurepath
source ~/.bashrc
```

**bunny2fmc ikke fundet:**
```bash
export PATH="$PATH:$HOME/.local/bin"
```

**Opdater:**
```bash
pipx upgrade bunny2fmc
```

**Afinstaller:**
```bash
pipx uninstall bunny2fmc
rm -rf ~/bunny2fmc/
```
