Make proftpd conf static

This commit is contained in:
Johannes Zellner
2019-03-19 11:51:00 -07:00
parent 044b27967e
commit ef0403af0e
4 changed files with 6 additions and 28 deletions
-20
View File
@@ -13,7 +13,6 @@ var addons = require('./addons.js'),
assert = require('assert'),
async = require('async'),
debug = require('debug')('box:platform'),
ejs = require('ejs'),
fs = require('fs'),
graphs = require('./graphs.js'),
infra = require('./infra_version.js'),
@@ -28,8 +27,6 @@ var addons = require('./addons.js'),
var NOOP_CALLBACK = function (error) { if (error) debug(error); };
var PROFTPD_CONFIG_EJS = fs.readFileSync(__dirname + '/proftpd.ejs', { encoding: 'utf8' });
function start(callback) {
assert.strictEqual(typeof callback, 'function');
@@ -63,7 +60,6 @@ function start(callback) {
startApps.bind(null, existingInfra),
graphs.startGraphite.bind(null, existingInfra),
addons.startServices.bind(null, existingInfra),
configureProftpd.bind(null, existingInfra),
fs.writeFile.bind(fs, paths.INFRA_VERSION_FILE, JSON.stringify(infra, null, 4))
], function (error) {
if (error) return callback(error);
@@ -167,19 +163,3 @@ function startApps(existingInfra, callback) {
callback();
}
}
function configureProftpd(existingInfra, callback) {
var data = {
sftpPort: 222,
ldapUrl: 'ldap://172.18.0.1:3002',
ldapUsersBaseDn: 'ou=proftpd,dc=cloudron',
ldapBindUsername: 'cn=admin@cloudron,ou=proftpd,dc=cloudron',
ldapBindPassword: 'password'
};
console.log('------ configure proftpd', data, paths.PROFTPD_CONFIG_FILE);
if (!safe.fs.writeFileSync(paths.PROFTPD_CONFIG_FILE, ejs.render(PROFTPD_CONFIG_EJS, data))) return callback(safe.error);
callback(null);
}