# Instalare

## Metoda recomandata

Wrapper-ul `setup.sh` este metoda standard de install si uninstall.

### Instalare locala

```bash
sudo ./setup.sh --local
```

### Instalare remote

```bash
sudo ./setup.sh <node>
sudo ./setup.sh --user admin <node>
```

## Ce instaleaza

- `/usr/local/sbin/pve-net-hang-watchdog.sh`
- `/usr/local/lib/xdev/pve-net-hang-watchdog/uninstall.sh`
- `/usr/local/sbin/xdev-pve-net-hang-watchdog-uninstall`
- `/etc/default/xdev-pve-net-hang-watchdog`
- `/etc/systemd/system/pve-net-hang-watchdog.service`
- `/usr/local/share/doc/xdev/pve-net-hang-watchdog/*`

## Activare

Installerul face:
- `systemctl daemon-reload`
- `systemctl enable --now pve-net-hang-watchdog.service`

Verificare:

```bash
sudo systemctl status pve-net-hang-watchdog.service
```

## Configurare

Defaults instalate:

```bash
sudo editor /etc/default/xdev-pve-net-hang-watchdog
```

Parametri suportati:
- `WATCH_BRIDGE`
- `WATCH_IFACE`
- `COOLDOWN_SECONDS`
- `HANG_PATTERN`

## Uninstall

```bash
sudo ./setup.sh --local --uninstall
sudo ./setup.sh --uninstall <node>
```

Sau direct pe host:

```bash
sudo /usr/local/lib/xdev/pve-net-hang-watchdog/uninstall.sh
```
