backups: fix mounting logic of backup settings and cloudron restore

This commit is contained in:
Girish Ramakrishnan
2021-05-26 23:01:05 -07:00
parent 98988202a1
commit a34bdb9ddf
5 changed files with 79 additions and 44 deletions

View File

@@ -31,6 +31,7 @@ exports = module.exports = {
configureCollectd,
generateEncryptionKeysSync,
isMountProvider,
BACKUP_IDENTIFIER_BOX: 'box',
@@ -116,6 +117,10 @@ function api(provider) {
}
}
function isMountProvider(provider) {
return provider === 'sshfs' || provider === 'cifs' || provider === 'nfs' || provider === 'ext4';
}
function injectPrivateFields(newConfig, currentConfig) {
if ('password' in newConfig) {
if (newConfig.password === constants.SECRET_PLACEHOLDER) {