Use /data instead of /supervisor/data

This commit is contained in:
Petros Angelatos 2014-04-27 22:41:59 +01:00 committed by Pablo Carranza Vélez
parent 1654e26245
commit c7ce76c436
3 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@ Promise.all([newUuid, oldUuid])
return bootstrap(newUuid) return bootstrap(newUuid)
.then -> .then ->
console.log('Starting OpenVPN..') console.log('Starting OpenVPN..')
openvpn = spawn('openvpn', ['client.conf'], cwd: '/supervisor/data') openvpn = spawn('openvpn', ['client.conf'], cwd: '/data')
# Prefix and log all OpenVPN output # Prefix and log all OpenVPN output
openvpn.stdout.on 'data', (data) -> openvpn.stdout.on 'data', (data) ->

View File

@ -16,7 +16,7 @@ module.exports = (uuid) ->
company: 'Rulemotion Ltd' company: 'Rulemotion Ltd'
csrName: 'client.csr' csrName: 'client.csr'
keyName: 'client.key' keyName: 'client.key'
outputDir: '/supervisor/data' outputDir: '/data'
email: 'vpn@resin.io' email: 'vpn@resin.io'
read: true read: true
country: '' country: ''
@ -48,11 +48,11 @@ module.exports = (uuid) ->
console.log('Configuring VPN..') console.log('Configuring VPN..')
vpnConf = fs.readFileAsync('/supervisor/src/openvpn.conf.tmpl', 'utf8') vpnConf = fs.readFileAsync('/supervisor/src/openvpn.conf.tmpl', 'utf8')
.then (tmpl) -> .then (tmpl) ->
fs.writeFileAsync('/supervisor/data/client.conf', _.template(tmpl)(body)) fs.writeFileAsync('/data/client.conf', _.template(tmpl)(body))
Promise.all([ Promise.all([
fs.writeFileAsync('/supervisor/data/ca.crt', body.ca) fs.writeFileAsync('/data/ca.crt', body.ca)
fs.writeFileAsync('/supervisor/data/client.crt', body.cert) fs.writeFileAsync('/data/client.crt', body.cert)
vpnConf vpnConf
]) ])
.then -> .then ->

View File

@ -4,7 +4,7 @@ Knex = require 'knex'
knex = Knex.initialize( knex = Knex.initialize(
client: 'sqlite3' client: 'sqlite3'
connection: connection:
filename: '/supervisor/data/database.sqlite' filename: '/data/database.sqlite'
) )
knex.init = Promise.all([ knex.init = Promise.all([