mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-05-05 18:38:14 +00:00
Give extra environment variables to preloaded apps. Ensures the app is not unnecessarily restarted as soon as we gain connectivity.
This commit is contained in:
parent
6062658933
commit
65df89aab6
@ -22,6 +22,11 @@ loadPreloadedApps = ->
|
|||||||
fs.readFileAsync(appsPath, 'utf8')
|
fs.readFileAsync(appsPath, 'utf8')
|
||||||
.then(JSON.parse)
|
.then(JSON.parse)
|
||||||
.map (app) ->
|
.map (app) ->
|
||||||
|
env =
|
||||||
|
RESIN_DEVICE_UUID: userConfig.uuid
|
||||||
|
RESIN: '1'
|
||||||
|
USER: 'root'
|
||||||
|
_.extend(app.env, env)
|
||||||
app.env = JSON.stringify(app.env)
|
app.env = JSON.stringify(app.env)
|
||||||
knex('app').insert(app)
|
knex('app').insert(app)
|
||||||
.catch (err) ->
|
.catch (err) ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user