#!/usr/bin/env bash
set -u
LOG_TAG=salsabil-tv-network
if command -v nm-connection-editor >/dev/null 2>&1; then
  nm-connection-editor >/dev/null 2>&1 &
  exit 0
fi
if command -v raspberrypi-net-mods >/dev/null 2>&1; then
  raspberrypi-net-mods >/dev/null 2>&1 &
  exit 0
fi
printf '%s\n' "Aucune interface graphique NetworkManager disponible." | systemd-cat -t "$LOG_TAG"
exit 1
