Skip to content

Commit

Permalink
reformating
Browse files Browse the repository at this point in the history
  • Loading branch information
patrix87 committed Sep 18, 2021
1 parent 555316f commit e11a37d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions functions/Backup-Server.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion functions/Send-Command.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion functions/Update-Server.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down
2 changes: 1 addition & 1 deletion templates/7daystodie.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -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")){
Expand Down

0 comments on commit e11a37d

Please sign in to comment.