mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-05-31 23:00:48 +00:00
apiBinder: Keep prepending RESIN_ to reported config variables
Signed-off-by: Pablo Carranza Velez <pablo@balena.io>
This commit is contained in:
parent
24cbfbb860
commit
583ce34c01
@ -324,13 +324,15 @@ module.exports = class APIBinder
|
|||||||
targetConfig = targetState.local.config
|
targetConfig = targetState.local.config
|
||||||
Promise.mapSeries _.toPairs(currentConfig), ([ key, value ]) =>
|
Promise.mapSeries _.toPairs(currentConfig), ([ key, value ]) =>
|
||||||
# We never want to disable VPN if, for instance, it failed to start so far
|
# We never want to disable VPN if, for instance, it failed to start so far
|
||||||
if key == 'RESIN_SUPERVISOR_VPN_CONTROL'
|
if key == 'SUPERVISOR_VPN_CONTROL'
|
||||||
value = 'true'
|
value = 'true'
|
||||||
if !targetConfig[key]? and value != defaultConfig[key]
|
if !targetConfig[key]? and value != defaultConfig[key]
|
||||||
|
# At some point the namespace in the API should change to BALENA_
|
||||||
|
# but for now we only have RESIN_
|
||||||
envVar = {
|
envVar = {
|
||||||
value
|
value
|
||||||
device: deviceId
|
device: deviceId
|
||||||
name: key
|
name: 'RESIN_' + key
|
||||||
}
|
}
|
||||||
@resinApi.post
|
@resinApi.post
|
||||||
resource: 'device_config_variable'
|
resource: 'device_config_variable'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user