Create file operation bucket before path checks
This commit is contained in:
@@ -107,6 +107,9 @@ $hostName = if ($ServerHost) { $ServerHost } elseif ($config.server.host) { $con
|
|||||||
$port = if ($ServerPort) { $ServerPort } elseif ($config.server.port) { $config.server.port } else { 5600 }
|
$port = if ($ServerPort) { $ServerPort } elseif ($config.server.port) { $config.server.port } else { 5600 }
|
||||||
$script:ApiBase = "{0}://{1}:{2}/api/0" -f $scheme, $hostName, $port
|
$script:ApiBase = "{0}://{1}:{2}/api/0" -f $scheme, $hostName, $port
|
||||||
|
|
||||||
|
$bucketId = 'aw-file-operations_' + $script:Hostname
|
||||||
|
Ensure-Bucket -BucketId $bucketId -ClientName 'aw-file-operations' -BucketType 'aw.file.operation'
|
||||||
|
|
||||||
# Разрешение путей для мониторинга
|
# Разрешение путей для мониторинга
|
||||||
$resolvedPaths = @()
|
$resolvedPaths = @()
|
||||||
foreach ($p in $WatchPaths) {
|
foreach ($p in $WatchPaths) {
|
||||||
@@ -128,8 +131,6 @@ if ($resolvedPaths.Count -eq 0) {
|
|||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
$bucketId = 'aw-file-operations_' + $script:Hostname
|
|
||||||
Ensure-Bucket -BucketId $bucketId -ClientName 'aw-file-operations' -BucketType 'aw.file.operation'
|
|
||||||
Write-FileCollectorLog "Запуск мониторинга путей: $($resolvedPaths -join ', ')"
|
Write-FileCollectorLog "Запуск мониторинга путей: $($resolvedPaths -join ', ')"
|
||||||
|
|
||||||
$watchers = @()
|
$watchers = @()
|
||||||
|
|||||||
Reference in New Issue
Block a user