#!/bin/bash

# Tools-tab entry — invoked by `libreportal app tool gluetun providers_refresh`.
# Resolved by dockerAppRunTool: tool id `providers_refresh` →
# function `appGluetunRefreshProviders`.
#
# Re-fetches gluetun's upstream servers.json and rewrites the WebUI
# provider snapshot used by the country picker.
appGluetunRefreshProviders()
{
    local tool_args="$1"

    isNotice "Refreshing Gluetun provider snapshot..."
    appWebuiRefresh_gluetun
    isSuccessful "Provider snapshot regenerated."
}
