]> git.p6c8.net - dsmonrot.git/commitdiff
Changed names of rotation functions
authorPatrick Canterino <patrick@patrick-canterino.de>
Fri, 24 Mar 2023 16:59:23 +0000 (17:59 +0100)
committerPatrick Canterino <patrick@patrick-canterino.de>
Fri, 24 Mar 2023 16:59:23 +0000 (17:59 +0100)
We use approved verbs now

Rotate-Backup -> Invoke-BackupRotation
Rotate-Log -> Invoke-LogRotation

dsmonrot.ps1

index 54c0972ebf9d771e866e4c7fbe266048a6e57bbb..ffe4f461f7da51b1e8a3dd297d2bb4753772cd87 100644 (file)
@@ -215,7 +215,7 @@ function Send-Email([String]$body) {
        }\r
 }\r
 \r
        }\r
 }\r
 \r
-function Rotate-Backup {\r
+function Invoke-BackupRotation {\r
        if($keepMonths -lt 0) {\r
                return\r
        }\r
        if($keepMonths -lt 0) {\r
                return\r
        }\r
@@ -235,7 +235,7 @@ function Rotate-Backup {
        }\r
 }\r
 \r
        }\r
 }\r
 \r
-function Rotate-Log {\r
+function Invoke-LogRotation {\r
        if($keepLogs -le 0) {\r
                return\r
        }\r
        if($keepLogs -le 0) {\r
                return\r
        }\r
@@ -407,7 +407,7 @@ if($errorMessages.Count -eq 0) {
                                \r
                                if($errorMessages.Count -eq 0) {\r
                                        if($rotateBeforeBackup) {\r
                                \r
                                if($errorMessages.Count -eq 0) {\r
                                        if($rotateBeforeBackup) {\r
-                                               Rotate-Backup\r
+                                               Invoke-BackupRotation\r
                                        }\r
                                        \r
                                        $dsLogPath = if($dsLogFileToBackup) { "$backupTargetFull\$dsLogFile" } else { $dsLogFile }\r
                                        }\r
                                        \r
                                        $dsLogPath = if($dsLogFileToBackup) { "$backupTargetFull\$dsLogFile" } else { $dsLogFile }\r
@@ -429,7 +429,7 @@ if($errorMessages.Count -eq 0) {
                                        }\r
                                        \r
                                        if($rotateBeforeBackup -eq $False -and $success -eq $True) {\r
                                        }\r
                                        \r
                                        if($rotateBeforeBackup -eq $False -and $success -eq $True) {\r
-                                               Rotate-Backup\r
+                                               Invoke-BackupRotation\r
                                        }\r
                                }\r
                        }\r
                                        }\r
                                }\r
                        }\r
@@ -450,7 +450,8 @@ if($errorMessages.Count -eq 0) {
        }\r
        \r
        # Rotate the log files\r
        }\r
        \r
        # Rotate the log files\r
-       Rotate-Log\r
+       Invoke-LogRotation\r
+\r
 }\r
 \r
 # If there was any error message recorded, send a mail if configured\r
 }\r
 \r
 # If there was any error message recorded, send a mail if configured\r

patrick-canterino.de