Add ASCII banner + regards trailer to long help
All checks were successful
All checks were successful
This commit is contained in:
@@ -19,6 +19,11 @@ pub const ASCII_BANNER: &str = indoc! {
|
|||||||
"#
|
"#
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pub const KIND_REGARDS: &str = concat!(
|
||||||
|
"Hacked together by yours truly, Programvareverkstedet <projects@pvv.ntnu.no>\n",
|
||||||
|
"If you experience any bugs or turbulence, please give us a heads up :)",
|
||||||
|
);
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct UnixUser {
|
pub struct UnixUser {
|
||||||
pub username: String,
|
pub username: String,
|
||||||
|
|||||||
12
src/main.rs
12
src/main.rs
@@ -16,7 +16,7 @@ use futures_util::StreamExt;
|
|||||||
use crate::{
|
use crate::{
|
||||||
core::{
|
core::{
|
||||||
bootstrap::bootstrap_server_connection_and_drop_privileges,
|
bootstrap::bootstrap_server_connection_and_drop_privileges,
|
||||||
common::executable_is_suid_or_sgid,
|
common::{ASCII_BANNER, KIND_REGARDS, executable_is_suid_or_sgid},
|
||||||
protocol::{Response, create_client_to_server_message_stream},
|
protocol::{Response, create_client_to_server_message_stream},
|
||||||
},
|
},
|
||||||
server::{command::ServerArgs, landlock::landlock_restrict_server},
|
server::{command::ServerArgs, landlock::landlock_restrict_server},
|
||||||
@@ -37,7 +37,15 @@ mod core;
|
|||||||
/// You are only allowed to manage databases and users that are prefixed with
|
/// You are only allowed to manage databases and users that are prefixed with
|
||||||
/// either your username, or a group that you are a member of.
|
/// either your username, or a group that you are a member of.
|
||||||
#[derive(Parser, Debug)]
|
#[derive(Parser, Debug)]
|
||||||
#[command(bin_name = "muscl", version, about, disable_help_subcommand = true)]
|
#[command(
|
||||||
|
bin_name = "muscl",
|
||||||
|
author = "Programvareverkstedet <projects@pvv.ntnu.no>",
|
||||||
|
version,
|
||||||
|
about,
|
||||||
|
disable_help_subcommand = true,
|
||||||
|
before_long_help = ASCII_BANNER,
|
||||||
|
after_long_help = KIND_REGARDS,
|
||||||
|
)]
|
||||||
struct Args {
|
struct Args {
|
||||||
#[command(subcommand)]
|
#[command(subcommand)]
|
||||||
command: Command,
|
command: Command,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ use clap_verbosity_flag::Verbosity;
|
|||||||
use tracing_subscriber::prelude::*;
|
use tracing_subscriber::prelude::*;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
core::common::{ASCII_BANNER, DEFAULT_CONFIG_PATH},
|
core::common::{ASCII_BANNER, DEFAULT_CONFIG_PATH, KIND_REGARDS},
|
||||||
server::supervisor::Supervisor,
|
server::supervisor::Supervisor,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -50,14 +50,7 @@ const LOG_LEVEL_WARNING: &str = r#"
|
|||||||
"#;
|
"#;
|
||||||
|
|
||||||
pub fn trace_server_prelude() {
|
pub fn trace_server_prelude() {
|
||||||
let message = [
|
let message = [ASCII_BANNER, "", KIND_REGARDS, ""].join("\n");
|
||||||
ASCII_BANNER,
|
|
||||||
"",
|
|
||||||
"Hacked together by yours truly, Programvareverkstedet <projects@pvv.ntnu.no>",
|
|
||||||
"If you experience any bugs or turbulence, please give us a heads up :)",
|
|
||||||
"",
|
|
||||||
]
|
|
||||||
.join("\n");
|
|
||||||
tracing::info!(message);
|
tracing::info!(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user