 			console.log('And process.exiting..')
 			process.exit()
 
-currentSupervisorConfig = currentContainer.then (container) ->
+currentConfigPromise = currentContainerPromise.then (container) ->
 	container.inspectAsync()
 .tap (currentSupervisor) ->
 	# The volume keys are the important bit.

localImage = config.localImage
remoteImage = config.remoteImage

getContainerId = ->
	fs.readFileAsync( '/proc/1/cgroup' )
	.then (data) ->
		data.toString().match( /:cpu:\/docker\/(.*)$/m )[1]
	.catch (err) ->
		return process.env.HOSTNAME

currentContainer = getContainerId().then (containerId) ->
		docker.getContainer(containerId)

startNewSupervisor = (currentSupervisor, waitForSuccess = true) ->

	.then ->
		# We've started the new container, so we're done here! #pray
		console.log('Removing our container and letting the new supervisor take over')
		currentContainerPromise.then (container) ->
			container.removeAsync(force: true)
		.finally ->
			# This should never really be reached as docker should already have terminated us,
