diff --git a/src/cloudron.js b/src/cloudron.js index ecbc994a8..15339e27f 100644 --- a/src/cloudron.js +++ b/src/cloudron.js @@ -186,7 +186,7 @@ function onActivated(callback) { function autoprovision(callback) { assert.strictEqual(typeof callback, 'function'); - const confJson = safe.fs.readFileSync(constants.AUTO_PROVISION_FILE, 'utf8'); + const confJson = safe.fs.readFileSync(paths.AUTO_PROVISION_FILE, 'utf8'); if (!confJson) return callback(); const conf = safe.JSON.parse(confJson); diff --git a/src/constants.js b/src/constants.js index 207b98519..da8ca1bd5 100644 --- a/src/constants.js +++ b/src/constants.js @@ -26,7 +26,6 @@ exports = module.exports = { NGINX_ADMIN_CONFIG_FILE_NAME: 'admin.conf', GHOST_USER_FILE: '/tmp/cloudron_ghost.json', - AUTO_PROVISION_FILE: '/root/autoprovision.json', DEFAULT_TOKEN_EXPIRATION: 7 * 24 * 60 * 60 * 1000, // 1 week diff --git a/src/paths.js b/src/paths.js index 58a21c47d..c592f5a3a 100644 --- a/src/paths.js +++ b/src/paths.js @@ -31,5 +31,7 @@ exports = module.exports = { ACME_ACCOUNT_KEY_FILE: path.join(config.baseDir(), 'boxdata/acme/acme.key'), APP_CERTS_DIR: path.join(config.baseDir(), 'boxdata/certs'), CLOUDRON_AVATAR_FILE: path.join(config.baseDir(), 'boxdata/avatar.png'), - UPDATE_CHECKER_FILE: path.join(config.baseDir(), 'boxdata/updatechecker.json') + UPDATE_CHECKER_FILE: path.join(config.baseDir(), 'boxdata/updatechecker.json'), + + AUTO_PROVISION_FILE: path.join(config.baseDir(), 'configs/autoprovision.json') };