add backupCommand, restoreCommand, persistentDirs
This commit is contained in:
@@ -238,12 +238,27 @@ async function getAddonMounts(app) {
|
||||
return mounts;
|
||||
}
|
||||
|
||||
function getPersistentDirMounts(app) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
|
||||
const mounts = [];
|
||||
if (!app.manifest.persistentDirs) return mounts;
|
||||
|
||||
for (const dir of app.manifest.persistentDirs) {
|
||||
const sanitized = dir.replace(/\//g, '_').replace(/^_/, '');
|
||||
const hostDir = `${paths.PERSISTENT_DATA_DIR}/${app.id}/${sanitized}`;
|
||||
mounts.push({ Target: dir, Source: hostDir, Type: 'bind', ReadOnly: false });
|
||||
}
|
||||
return mounts;
|
||||
}
|
||||
|
||||
async function getMounts(app) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
|
||||
const volumeMounts = await getVolumeMounts(app);
|
||||
const addonMounts = await getAddonMounts(app);
|
||||
return volumeMounts.concat(addonMounts);
|
||||
const persistentDirMounts = getPersistentDirMounts(app);
|
||||
return volumeMounts.concat(addonMounts).concat(persistentDirMounts);
|
||||
}
|
||||
|
||||
async function getAddressesForPort53() {
|
||||
|
||||
Reference in New Issue
Block a user