From: Patrick Canterino Date: Fri, 24 Mar 2023 16:59:23 +0000 (+0100) Subject: Changed names of rotation functions X-Git-Url: https://git.p6c8.net/dsmonrot.git/commitdiff_plain/70fdaec308c09806a989e53aae914e5af4e9dae5?hp=b682465a47a8431a7d30e9eb29340133a4d4f2f3 Changed names of rotation functions We use approved verbs now Rotate-Backup -> Invoke-BackupRotation Rotate-Log -> Invoke-LogRotation --- diff --git a/dsmonrot.ps1 b/dsmonrot.ps1 index 54c0972..ffe4f46 100644 --- a/dsmonrot.ps1 +++ b/dsmonrot.ps1 @@ -215,7 +215,7 @@ function Send-Email([String]$body) { } } -function Rotate-Backup { +function Invoke-BackupRotation { if($keepMonths -lt 0) { return } @@ -235,7 +235,7 @@ function Rotate-Backup { } } -function Rotate-Log { +function Invoke-LogRotation { if($keepLogs -le 0) { return } @@ -407,7 +407,7 @@ if($errorMessages.Count -eq 0) { if($errorMessages.Count -eq 0) { if($rotateBeforeBackup) { - Rotate-Backup + Invoke-BackupRotation } $dsLogPath = if($dsLogFileToBackup) { "$backupTargetFull\$dsLogFile" } else { $dsLogFile } @@ -429,7 +429,7 @@ if($errorMessages.Count -eq 0) { } if($rotateBeforeBackup -eq $False -and $success -eq $True) { - Rotate-Backup + Invoke-BackupRotation } } } @@ -450,7 +450,8 @@ if($errorMessages.Count -eq 0) { } # Rotate the log files - Rotate-Log + Invoke-LogRotation + } # If there was any error message recorded, send a mail if configured