eventlog: add service rebuild/restart/configure events
This commit is contained in:
+2
-2
@@ -99,7 +99,7 @@ async function add(volume, auditSource) {
|
||||
|
||||
eventlog.add(eventlog.ACTION_VOLUME_ADD, auditSource, { id, name, hostPath: volume.hostPath });
|
||||
// in theory, we only need to do this mountpoint volumes. but for some reason a restart is required to detect new "mounts"
|
||||
safe(services.rebuildService('sftp'), { debug });
|
||||
safe(services.rebuildService('sftp', auditSource), { debug });
|
||||
|
||||
const collectdConf = ejs.render(COLLECTD_CONFIG_EJS, { volumeId: id, hostPath: volume.hostPath });
|
||||
await collectd.addProfile(id, collectdConf);
|
||||
@@ -152,7 +152,7 @@ async function del(volume, auditSource) {
|
||||
eventlog.add(eventlog.ACTION_VOLUME_REMOVE, auditSource, { volume });
|
||||
|
||||
if (volume.mountType === 'mountpoint' || volume.mountType === 'filesystem') {
|
||||
safe(services.rebuildService('sftp'), { debug });
|
||||
safe(services.rebuildService('sftp', auditSource), { debug });
|
||||
} else {
|
||||
await safe(mounts.removeMount(volume));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user