@retiolus if the script fails, where does it report?

Also: <shellcheck.net/>

$ shellcheck myscript

Line 32:
local active_connections=$(nmcli -t -f NAME,UUID con show --active | grep -v "mullvad")
^-- SC2155 (warning): Declare and assign separately to avoid masking return values.

Line 36:
local network_uuid=$(echo "$active_connections" | awk -F: '{print $2}')
^-- SC2155 (warning): Declare and assign separately to avoid masking return values.