We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 502eed0 commit 24b402fCopy full SHA for 24b402f
1 file changed
scripts/powershell/maintenance.ps1
@@ -9,6 +9,12 @@ param(
9
$logsDir = Join-Path $BaseInstallPath "logs"
10
$maintenanceLogFile = Join-Path $logsDir "maintenance.log"
11
12
+if (-not (Test-Path $logsDir)) {
13
+ New-Item -Path $logsDir -ItemType Directory -Force | Out-Null
14
+}
15
+
16
17
18
$services = Get-Service |
19
Where-Object { $_.Name -like "Gateway-*" } |
20
ForEach-Object {
@@ -203,6 +209,7 @@ switch ($Action) {
203
209
204
210
"RotateLogs" {
205
211
Stop-AllServices -Services $Services -TimeoutSeconds $startStopTimeoutSeconds
212
+ Rotate-LogFile -LogFile $maintenanceLogFile -RetainCount 5
206
213
Rotate-ServiceLogs -Services $services -LogsDir $logsDir
207
214
Start-AllServices -Services $Services -TimeoutSeconds $startStopTimeoutSeconds
208
215
}
0 commit comments