-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAstro_default.ps1
More file actions
77 lines (74 loc) · 2.91 KB
/
Astro_default.ps1
File metadata and controls
77 lines (74 loc) · 2.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
Function New-LaunchScriptAstroPS {
# ASTRONEER Dedicated Server
# APP ID # 728470
################## Change Default Variables #################
# Server IP
${global:IP} = "${ip}"
# Server Port
$global:port = "7777"
# Query Port
$global:queryport = "27015"
# Server Name
$global:hostname = "SERVERNAME"
# Server Password
$global:serverpassword = " "
##############################/\##############################
#Engine.ini
#[URL]
#Port=7777
# 7777-7778
#AstroServerSettings.ini
#PublicIP=10.10.10.100
#OwnerName=yoursteamname
#OwnerGuid=0
###################### Do not change below #####################
# System Directory
$global:systemdir = "$serverdir"
# Server Config Directory
$global:servercfgdir = "$serverdir\Astro\Saved\Config\WindowsServer"
# Server Executable
$global:executable = "AstroServer-Win64-Shipping"
# Server Executable Directory
$global:executabledir = "$serverdir\Astro\Binaries\Win64"
# Gamedig Query
$global:querytype = "protocol-valve"
# Game Process
$global:process = "AstroServer-Win64-Shipping"
# Log Directory
$global:logdirectory = "$serverdir\Astro\Saved\Logs"
# Server Log
$global:consolelog = "Astro.log"
# Game-Server-Config Directory
$global:gamedirname = ""
# Game-Server-Config
$global:servercfg = "AstroServerSettings.ini"
# Game-Server-Config
$global:config2 = "Engine.ini"
# Server Launch Command
$global:launchParams = '@("${executable} -log")'
# AstroServer.exe
# Advanced must be set to "0"
Get-UserInput
# Download Game-Server-Config
# Get-Servercfg
# Edit Server Game-Server-Config
# Select-EditSourceCFG
# Install Adjustment
Set-Location $executabledir
Start-Process cmd "/c start AstroServer-Win64-Shipping.exe"
Start-sleep -Seconds 30
Get-StopServer
Get-asserverInstallChanges
Set-Location $currentdir
}
Function Get-asserverInstallChanges {
if ($servercfg) {
$serverconfig = (gc $servercfgdir\$servercfg).Replace("ServerName=","ServerName=$hostname").Replace("PublicIP=","PublicIP=$extip").Replace("ServerPassword=$password","ServerPassword=") | Set-Content $servercfgdir\$servercfg -Force
}
if (Test-Path $servercfgdir\$config2) {
# New-Item $servercfgdir\$config2 -Force
Add-Content $servercfgdir\$config2 `
"[URL]
Port=$port"
}
}