File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -182,6 +182,26 @@ function bashio::supervisor.timezone() {
182182 fi
183183}
184184
185+ # ------------------------------------------------------------------------------
186+ # Returns or sets the current country of the system.
187+ #
188+ # Arguments:
189+ # $1 Country to set (optional).
190+ # ------------------------------------------------------------------------------
191+ function bashio::supervisor.country() {
192+ local country=${1:- }
193+
194+ bashio::log.trace " ${FUNCNAME[0]} :" " $@ "
195+
196+ if bashio::var.has_value " ${country} " ; then
197+ channel=$( bashio::var.json country " ${country} " )
198+ bashio::api.supervisor POST /supervisor/options " ${country} "
199+ bashio::cache.flush_all
200+ else
201+ bashio::supervisor ' supervisor.info.country' ' .country'
202+ fi
203+ }
204+
185205# ------------------------------------------------------------------------------
186206# Returns the current logging level of the Supervisor.
187207#
You can’t perform that action at this time.
0 commit comments