-
Notifications
You must be signed in to change notification settings - Fork 9
/
umod-server-start.cmd
44 lines (40 loc) · 1.25 KB
/
umod-server-start.cmd
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
@ECHO off
SETLOCAL
:start
set _date=%date:~4%
set _date=%_date:/=-%
IF NOT EXIST umod-server-vars.cfg goto :end
IF EXIST umod-server-vars.cfg FOR /F "delims=" %%A IN (umod-server-vars.cfg) DO SET "%%A"
ECHO Updating Server...
powershell -ExecutionPolicy Bypass -File "c:\rust-oxide-umod\powershell\umod-rustserver-update.ps1"
ECHO Updating uMod Plugins...
powershell -ExecutionPolicy Bypass -File "c:\rust-oxide-umod\powershell\umod-plugin-update.ps1"
set OPTS=-batchmode -nographics ^
-LogFile c:\backups\serverlog-%_date%.log ^
-server.official %official% ^
-server.hostname %host% ^
-server.description %descr% ^
-server.headerimage %image% ^
-server.logoimage %logo% ^
-server.url %url% ^
-server.port %sport% ^
-rcon.port %rport% ^
-rcon.web %rweb% ^
-rcon.password %rpass% ^
-server.identity %identity% ^
-server.level %level% ^
-server.seed %seed% ^
-server.worldsize %size% ^
-server.maxplayers %maxplayers% ^
-server.radiation %radiation% ^
-server.stability %stability% ^
-decay.upkeep %upkeep%
set CMDLINE=RustDedicated.exe %OPTS%
ECHO %CMDLINE%
ECHO Starting Server...
ECHO This may take a while...
START /HIGH /WAIT "Rust Dedicated Server" /D "C:\rust-oxide-umod" cmd.exe /K %CMDLINE%
ECHO Restarting Server... (Press CTRL+C to cancel)
timeout /t 10
goto start
:end