do not remove mount file if mountType was no-op

we might end up removing user's systemd file
This commit is contained in:
Girish Ramakrishnan
2021-05-13 23:37:25 -07:00
parent 6f2382d5ff
commit 06b7cb962b
+1 -1
View File
@@ -252,7 +252,7 @@ async function del(volume, auditSource) {
eventlog.add(eventlog.ACTION_VOLUME_REMOVE, auditSource, { volume });
services.rebuildService('sftp', async function () {
await safe(removeMountFile(volume));
if (volume.mountType !== 'noop') await safe(removeMountFile(volume));
});
collectd.removeProfile(volume.id, NOOP_CALLBACK);
}