Explicitly mount all apps into the sftp container

This commit is contained in:
Johannes Zellner
2020-07-29 19:47:37 +02:00
parent e1718c4e8d
commit 0a44d426fa
2 changed files with 23 additions and 13 deletions

View File

@@ -580,6 +580,9 @@ function install(app, args, progressCallback, callback) {
startApp.bind(null, app),
progressCallback.bind(null, { percent: 80, message: 'Configuring file manager' }),
sftp.rebuild.bind(null, {}),
progressCallback.bind(null, { percent: 85, message: 'Waiting for DNS propagation' }),
exports._waitForDnsPropagation.bind(null, app),
@@ -781,6 +784,9 @@ function configure(app, args, progressCallback, callback) {
startApp.bind(null, app),
progressCallback.bind(null, { percent: 80, message: 'Configuring file manager' }),
sftp.rebuild.bind(null, {}),
progressCallback.bind(null, { percent: 90, message: 'Configuring reverse proxy' }),
configureReverseProxy.bind(null, app),
@@ -791,7 +797,8 @@ function configure(app, args, progressCallback, callback) {
debugApp(app, 'error reconfiguring : %s', error);
return updateApp(app, { installationState: apps.ISTATE_ERROR, error: makeTaskError(error, app) }, callback.bind(null, error));
}
callback(null);
callback();
});
}
@@ -874,14 +881,17 @@ function update(app, args, progressCallback, callback) {
progressCallback.bind(null, { percent: 45, message: 'Downloading icon' }),
downloadIcon.bind(null, app),
progressCallback.bind(null, { percent: 70, message: 'Updating addons' }),
progressCallback.bind(null, { percent: 60, message: 'Updating addons' }),
addons.setupAddons.bind(null, app, updateConfig.manifest.addons),
progressCallback.bind(null, { percent: 80, message: 'Creating container' }),
progressCallback.bind(null, { percent: 70, message: 'Creating container' }),
createContainer.bind(null, app),
startApp.bind(null, app),
progressCallback.bind(null, { percent: 80, message: 'Configuring file manager' }),
sftp.rebuild.bind(null, {}),
progressCallback.bind(null, { percent: 100, message: 'Done' }),
updateApp.bind(null, app, { installationState: apps.ISTATE_INSTALLED, error: null, health: null, updateTime: new Date() })
], function seriesDone(error) {
@@ -984,10 +994,10 @@ function uninstall(app, args, progressCallback, callback) {
progressCallback.bind(null, { percent: 30, message: 'Teardown addons' }),
addons.teardownAddons.bind(null, app, app.manifest.addons),
progressCallback.bind(null, { percent: 40, message: 'Remove sftp addon binding' }),
progressCallback.bind(null, { percent: 40, message: 'Cleanup file manager' }),
function (callback) {
if (!app.dataDir) return callback();
sftp.rebuild({ ignoredDataDirs: [ app.dataDir ] }, callback);
sftp.rebuild({ ignoredApps: [ app.id ] }, callback);
},
progressCallback.bind(null, { percent: 50, message: 'Deleting app data directory' }),