Non-interactive server start
Closed this issue · 9 comments
I would like to request new startup arguments to make the (first) server start non-interactive.
Currently you need to specify whether to keep or edit the default config and whether to store it globally or just for this server.
It would be great if those options could be specified via startup arguments so that the server starts directly without requiring any keyboard input.
The best way is to generate the config file using some script, because it allows to fully customize the config file. We can add a parameter to use the default config if you want to.
Thank you for the quick help. So if I use the new —useDefault flag, it will just use the default config without asking whether to edit the file, right? Will it still store the config in the config Directory?
Like if you entered keep this after startup.
It will skip the configuration wizard and write the default config as a local config file (for this specific port).
@zabszk LocalAdmin crashes all the time causing mega bytes of log output a second.
Here's my start command :
./LocalAdmin 7778 --printStd --noSetCursor --config /home/ips-hosting/localadmin_config.txt --useDefault
I set the env var HOME=/home/ips-hosting
.
Crash logs contain the following:
System.IO.IOException: Read-only file system
at System.IO.FileSystem.CreateDirectory(String) + 0x5b1
at System.IO.Directory.CreateDirectory(String) + 0x2d
at LocalAdmin.V2.IO.Logging.Logger.Initialize() + 0x113
at LocalAdmin.V2.Core.LocalAdmin.StartSession() + 0xcf
So it seems like LocalAdmin
still tries to create something outside of the home directory. Unfortunately it does not show the dir / file path it tries to ceate.
The localadmin_config.txt
is successfully created at the desired location with default values.
Note that I dont have the port number in the config path, because there can only ever be one server per file system so this makes things a lot easier to find.
There should be more info (eg. which directory is being created and error description) above that error. Can you send it to me?
The crash log only contains the contents I send.
Can you disable logging (either in the config or by adding --noLogs
)? There is no argument to change logging directory yet.
Disabling logs makes the server launch correctly.
Issue should be resolved by adding --logs and --gameLogs args in LocalAdmin version 2.3.8. You can download it from the release page (https://github.com/northwood-studios/LocalAdmin-V2/releases).
Set --gameLogs to %appdata%/SCP Secret Laboratory/ServerLogs/server port number here
and --logs to %appdata%/SCP Secret Laboratory/LocalAdminLogs/server port number here
. This will allow you to use logs and log cleanup.