From e11a37d55b54f4208ea330c93443eb2f68507111 Mon Sep 17 00:00:00 2001 From: Patrick Veilleux Date: Fri, 17 Sep 2021 20:36:35 -0400 Subject: [PATCH] reformating --- functions/Backup-Server.psm1 | 4 ++-- functions/Send-Command.psm1 | 2 +- functions/Update-Server.psm1 | 2 +- main.ps1 | 2 +- templates/7daystodie.psm1 | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/functions/Backup-Server.psm1 b/functions/Backup-Server.psm1 index 01d44b2..9315dbb 100644 --- a/functions/Backup-Server.psm1 +++ b/functions/Backup-Server.psm1 @@ -3,11 +3,11 @@ function Backup-Server { #Create backup name from date and time $BackupName = Get-TimeStamp #Check if Backups Destination directory exist and create it. - if (-not(Test-Path -Path "$($Backups.Path)\$Type" -PathType "Container")){ + if (-not (Test-Path -Path "$($Backups.Path)\$Type" -PathType "Container")){ New-Item -Path "$($Backups.Path)\$Type" -ItemType "directory" -ErrorAction SilentlyContinue } #Check if Backups Source directory exist and create it. - if (-not(Test-Path -Path $Backups.Saves -PathType "Container")){ + if (-not (Test-Path -Path $Backups.Saves -PathType "Container")){ New-Item -Path $Backups.Saves -ItemType "directory" -ErrorAction SilentlyContinue } #Resolve Server Saves Path diff --git a/functions/Send-Command.psm1 b/functions/Send-Command.psm1 index c595cf4..f79cacf 100644 --- a/functions/Send-Command.psm1 +++ b/functions/Send-Command.psm1 @@ -23,7 +23,7 @@ function Send-Command { #send Telnet command. $Result = Get-Telnet -Command "$Command `"$Message`"" -RemoteHost $Server.ManagementIP -Port $Server.ManagementPort -Password $Server.ManagementPassword Write-Host $Result - if (-not(($Result -like "*Unable to connect to host:*") -or ($Result -like "*incorrect*"))) { + if (-not (($Result -like "*Unable to connect to host:*") -or ($Result -like "*incorrect*"))) { $Success = $true } } diff --git a/functions/Update-Server.psm1 b/functions/Update-Server.psm1 index 1b138b9..5858837 100644 --- a/functions/Update-Server.psm1 +++ b/functions/Update-Server.psm1 @@ -5,7 +5,7 @@ function Update-Server { [string]$UpdateType ) #Create server directory if not found. - if (-not(Test-Path -Path $Server.Path)){ + if (-not (Test-Path -Path $Server.Path)){ New-Item -ItemType "directory" -Path $Server.Path -ErrorAction SilentlyContinue } #Resolve complete path of the server folder. diff --git a/main.ps1 b/main.ps1 index 757e244..4e357a5 100644 --- a/main.ps1 +++ b/main.ps1 @@ -83,7 +83,7 @@ $Dependencies = @{ #For each dependency check if the excutable exist, if not, add the key of the dependency to the MissingDependencies list. foreach ($Key in $Dependencies.keys) { - if (-not(Test-Path -Path $Dependencies[$Key])) { + if (-not (Test-Path -Path $Dependencies[$Key])) { $null = $MissingDependencies.Add($Key) } } diff --git a/templates/7daystodie.psm1 b/templates/7daystodie.psm1 index 4bab4c0..04c280e 100644 --- a/templates/7daystodie.psm1 +++ b/templates/7daystodie.psm1 @@ -193,7 +193,7 @@ function Start-ServerPrep { #Copy Config File if not created. Do not modify the one in the server directory, it will be overwriten on updates. $ConfigFilePath = Split-Path -Path $Server.ConfigFile - if (-not(Test-Path -Path $ConfigFilePath)){ + if (-not (Test-Path -Path $ConfigFilePath)){ New-Item -ItemType "directory" -Path $ConfigFilePath -Force -ErrorAction SilentlyContinue } If(-not (Test-Path -Path $Server.ConfigFile -PathType "leaf")){