Started Adding Powershell Scripts
This commit is contained in:
parent
c689b658e3
commit
18dc79c5d2
15
script/minecraft-server-start.ps1
Normal file
15
script/minecraft-server-start.ps1
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
$serverdir = "M:\project\minecraft-server-anywhere\survival"
|
||||||
|
$servername = "survival"
|
||||||
|
|
||||||
|
# Load Environment Variables of Server
|
||||||
|
get-content $serverdir\$servername.env | ForEach-Object {
|
||||||
|
if (!$_.StartsWith("#") -and !($_.Length -eq 0)) { # Skips Empty and Commented Lines
|
||||||
|
$name, $value = $_.split('=')
|
||||||
|
Set-Variable "server.$name" "$value"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Get-Variable *
|
Loading…
Reference in a new issue