 
 application = {}
 
-application.kill = kill = (app) ->
+application.kill = kill = (app, updateDB = true) ->
 	logSystemEvent(logTypes.stopApp, app)
 	device.updateState(status: 'Stopping')
 	container = docker.getContainer(app.containerId)

	allAppIds = _.union(localAppIds, remoteAppIds)
	return { toBeRemoved, toBeDownloaded, toBeInstalled, toBeUpdated, appsWithChangedEnvs, allAppIds }

application.update = update = (force) ->
	if updateStatus.state isnt UPDATE_IDLE
		# Mark an update required after the current.

		return
	updateStatus.state = UPDATE_UPDATING
	bootstrap.done.then ->
		Promise.join getConfig('apiKey'), getConfig('uuid'), knex('app').select(), (apiKey, uuid, apps) ->
			deviceId = device.getID()
			remoteApps = getRemoteApps(uuid, apiKey)

