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:
Pablo Carranza Vélez 2015-10-01 17:57:42 +00:00
parent 6062658933
commit 65df89aab6

View File

@ -22,6 +22,11 @@ loadPreloadedApps = ->
fs.readFileAsync(appsPath, 'utf8')
.then(JSON.parse)
.map (app) ->
env =
RESIN_DEVICE_UUID: userConfig.uuid
RESIN: '1'
USER: 'root'
_.extend(app.env, env)
app.env = JSON.stringify(app.env)
knex('app').insert(app)
.catch (err) ->