Various fixes and improvements
This commit is contained in:
parent
62422f2ef0
commit
bf84d04cf6
@ -1,12 +1,12 @@
|
|||||||
# Use bash script to start server
|
# Use bash script to start server
|
||||||
|
|
||||||
You may use a `bash` script to start your server, rather than invoking `java`
|
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
|
directly. This requires some changes though to ensure your server properly shuts
|
||||||
shuts down.
|
down.
|
||||||
|
|
||||||
When `lazymc` wants to stop your server, it sends a [`SIGTERM`][sigterm] signal
|
When `lazymc` stops your server it sends a [`SIGTERM`][sigterm] signal to the
|
||||||
to the server command to gracefully shut it down. `bash` ignores this signal by
|
invoked server process to gracefully shut it down. `bash` ignores this signal by
|
||||||
default and keeps the server running.
|
default and keeps the Minecraft server running.
|
||||||
|
|
||||||
You must configure `bash` to [forward][forward-signal] the signal to properly
|
You must configure `bash` to [forward][forward-signal] the signal to properly
|
||||||
shutdown the Minecraft server as well.
|
shutdown the Minecraft server as well.
|
||||||
|
@ -25,7 +25,7 @@ pub fn load(matches: &ArgMatches) -> Config {
|
|||||||
if !path.is_file() {
|
if !path.is_file() {
|
||||||
quit_error_msg(
|
quit_error_msg(
|
||||||
format!(
|
format!(
|
||||||
"Conig file does not exist: {}",
|
"Config file does not exist: {}",
|
||||||
path.to_str().unwrap_or("?")
|
path.to_str().unwrap_or("?")
|
||||||
),
|
),
|
||||||
ErrorHintsBuilder::default()
|
ErrorHintsBuilder::default()
|
||||||
|
@ -153,7 +153,7 @@ impl ServerState {
|
|||||||
.map(|i| i >= Instant::now())
|
.map(|i| i >= Instant::now())
|
||||||
.unwrap_or(false);
|
.unwrap_or(false);
|
||||||
if keep_online {
|
if keep_online {
|
||||||
info!("Not sleeping because of keep online");
|
trace!(target: "lazymc", "Not sleeping because of keep online");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,18 +127,18 @@ impl ErrorHints {
|
|||||||
|
|
||||||
// Print hints
|
// Print hints
|
||||||
let bin = crate::util::bin_name();
|
let bin = crate::util::bin_name();
|
||||||
if self.config {
|
|
||||||
eprintln!(
|
|
||||||
"Use '{}' to select a config file",
|
|
||||||
highlight("--config FILE")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
if self.config_generate {
|
if self.config_generate {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Use '{}' to generate a new config file",
|
"Use '{}' to generate a new config file",
|
||||||
highlight(&format!("{} config generate", bin))
|
highlight(&format!("{} config generate", bin))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if self.config {
|
||||||
|
eprintln!(
|
||||||
|
"Use '{}' to select a config file",
|
||||||
|
highlight("--config FILE")
|
||||||
|
);
|
||||||
|
}
|
||||||
if self.config_test {
|
if self.config_test {
|
||||||
eprintln!(
|
eprintln!(
|
||||||
"Use '{}' to test a config file",
|
"Use '{}' to test a config file",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user