 		err.message or err
 	"#{failures.length} error#{s}: #{messages.join(' - ')}"
 
+# Example callback function to enable/disable vpn
+# enableVpn = (val) ->
+# 	if val == '1' then console.log('Enabling VPN') else console.log('Disabling VPN')
+
+specialActionEnvVars = {
+	'RESIN_OVERRIDE_LOCK': null
+	# @Praneeth: maybe add your vars here with a callback as value? e.g:
+	# 'RESIN_ENABLE_VPN': enableVpn
+}
+
 UPDATE_IDLE = 0
 UPDATE_UPDATING = 1
 UPDATE_REQUIRED = 2

					if app.environment_variable?
						_.extend(env, app.environment_variable)
					remoteAppEnvs[app.id] = env
					return {
						appId: '' + app.id
						commit: app.commit


				remoteApps = _.indexBy(remoteApps, 'appId')
				remoteAppIds = _.keys(remoteApps)

				# @Praneeth: looks like this might be a good place to run the special functions,
				# like turning vpn on/off if remoteAppEnvs has the corresponding variable.
				_.map specialActionEnvVars, (specialActionCallback, key) ->
					_.map remoteAppIds, (appId) ->
						if remoteAppEnvs[appId][key]? && specialActionCallback?
							specialActionCallback(remoteAppEnvs[appId][key])

				apps = _.indexBy(apps, 'appId')
				localApps = _.mapValues apps, (app) ->
