mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-20 17:52:51 +00:00
Use /data instead of /supervisor/data
This commit is contained in:
parent
1654e26245
commit
c7ce76c436
@ -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) ->
|
||||||
|
@ -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 ->
|
||||||
|
@ -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([
|
||||||
|
Loading…
x
Reference in New Issue
Block a user