Update server startup scripts: Added 'nogui' argument to run.sh for headless operation and removed obsolete start-headless.bat and start-headless.sh files to streamline server launch process.

This commit is contained in:
Leonid Pershin
2026-05-07 23:12:56 +03:00
parent ce33648425
commit 6a64925351
5 changed files with 2 additions and 24 deletions
+1 -1
View File
@@ -3,5 +3,5 @@ REM Forge requires a configured set of both JVM and program arguments.
REM Add custom JVM arguments to the user_jvm_args.txt REM Add custom JVM arguments to the user_jvm_args.txt
REM Add custom program arguments {such as nogui} to this file in the next line before the %* or REM Add custom program arguments {such as nogui} to this file in the next line before the %* or
REM pass them to this script directly REM pass them to this script directly
java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.228/win_args.txt %* java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.228/win_args.txt nogui %*
pause pause
+1 -1
View File
@@ -3,4 +3,4 @@
# Add custom JVM arguments to the user_jvm_args.txt # Add custom JVM arguments to the user_jvm_args.txt
# Add custom program arguments {such as nogui} to this file in the next line before the "$@" or # Add custom program arguments {such as nogui} to this file in the next line before the "$@" or
# pass them to this script directly # pass them to this script directly
java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.228/unix_args.txt "$@" java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.228/unix_args.txt nogui "$@"
-11
View File
@@ -1,11 +0,0 @@
@echo off
setlocal
if not exist "logs" mkdir "logs"
echo Starting server in background (no GUI)...
start "" /B java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.228/win_args.txt nogui %* >> "logs\server-headless.log" 2>&1
echo Server launch command sent.
echo Log file: logs\server-headless.log
echo To stop server gracefully, use RCON or run taskkill on java process if needed.
-11
View File
@@ -1,11 +0,0 @@
#!/usr/bin/env sh
set -eu
mkdir -p logs
echo "Starting server in background (no GUI)..."
nohup java @user_jvm_args.txt @libraries/net/neoforged/neoforge/21.1.228/unix_args.txt nogui "$@" >> logs/server-headless.log 2>&1 &
echo $! > server.pid
echo "Server started with PID $(cat server.pid)"
echo "Log file: logs/server-headless.log"