Various fixes and improvements

This commit is contained in:
timvisee 2021-11-08 20:28:10 +01:00
parent 62422f2ef0
commit bf84d04cf6
No known key found for this signature in database
GPG Key ID: B8DB720BC383E172
4 changed files with 14 additions and 14 deletions

View File

@ -1,12 +1,12 @@
# Use bash script to start server
You may use a `bash` script to start your server, rather than invoking `java`
directly. This requires some changes though, to ensure your server properly
shuts down.
You may use a `bash` script to start your server rather than invoking `java`
directly. This requires some changes though to ensure your server properly shuts
down.
When `lazymc` wants to stop your server, it sends a [`SIGTERM`][sigterm] signal
to the server command to gracefully shut it down. `bash` ignores this signal by
default and keeps the server running.
When `lazymc` stops your server it sends a [`SIGTERM`][sigterm] signal to the
invoked server process to gracefully shut it down. `bash` ignores this signal by
default and keeps the Minecraft server running.
You must configure `bash` to [forward][forward-signal] the signal to properly
shutdown the Minecraft server as well.

View File

@ -25,7 +25,7 @@ pub fn load(matches: &ArgMatches) -> Config {
if !path.is_file() {
quit_error_msg(
format!(
"Conig file does not exist: {}",
"Config file does not exist: {}",
path.to_str().unwrap_or("?")
),
ErrorHintsBuilder::default()

View File

@ -153,7 +153,7 @@ impl ServerState {
.map(|i| i >= Instant::now())
.unwrap_or(false);
if keep_online {
info!("Not sleeping because of keep online");
trace!(target: "lazymc", "Not sleeping because of keep online");
return false;
}

View File

@ -127,18 +127,18 @@ impl ErrorHints {
// Print hints
let bin = crate::util::bin_name();
if self.config {
eprintln!(
"Use '{}' to select a config file",
highlight("--config FILE")
);
}
if self.config_generate {
eprintln!(
"Use '{}' to generate a new config file",
highlight(&format!("{} config generate", bin))
);
}
if self.config {
eprintln!(
"Use '{}' to select a config file",
highlight("--config FILE")
);
}
if self.config_test {
eprintln!(
"Use '{}' to test a config file",