mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2024-12-29 18:18:52 +00:00
bootstrap: if offlineMode is enabled, persist only the uuid
If we don't persist the uuid then every time the supervisor starts it will think it's a new device. This triggers a wipe of the local state and also a re-load of the preloaded apps. This in turn causes multiple instances of the preloaded apps to be left running. Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
This commit is contained in:
parent
d6a7608374
commit
dd06f993ce
@ -111,7 +111,10 @@ bootstrapper.startBootstrapping = ->
|
||||
readConfigAndEnsureUUID()
|
||||
.tap ->
|
||||
loadPreloadedApps()
|
||||
.tap ->
|
||||
bootstrapOrRetry()
|
||||
.tap (uuid) ->
|
||||
if bootstrapper.offlineMode
|
||||
return knex('config').insert({ key: 'uuid', value: uuid })
|
||||
else
|
||||
return bootstrapOrRetry()
|
||||
|
||||
module.exports = bootstrapper
|
||||
|
Loading…
Reference in New Issue
Block a user