 				return callback(error)
 
 			try
+				if typeof body isnt 'object'
+					throw new Error(body)
+
 				body = JSON.parse(body)
 			catch error
 				callback(error)
-			
+
 			state.virgin = false
 			state.uuid = body.uuid
+			state.giturl = body.giturl
 
 			fs.writeFileSync('state.json', JSON.stringify(state))
 

	(callback) -> exec('systemctl enable openvpn@client', callback)
]

async.series(stage1Tasks, ->
	console.log('Bootstrapped')
)

{exec} = require('child_process')

API_ENDPOINT = 'http://paras.rulemotion.com:1337'
HOME_PATH = '/home/haki'

try
	state = require('./state.json')
