From 7fce8d595bc579193422e8d67ed3c26721f442ba Mon Sep 17 00:00:00 2001 From: Pedro Melo Date: Sat, 22 Nov 2025 20:29:42 +0000 Subject: [PATCH] Add silent option to daemon command This will disable the startup "Web application available at..." message. --- lib/Mojolicious/Command/daemon.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/Mojolicious/Command/daemon.pm b/lib/Mojolicious/Command/daemon.pm index a3bb2b8bb6..9d3cbd53c2 100644 --- a/lib/Mojolicious/Command/daemon.pm +++ b/lib/Mojolicious/Command/daemon.pm @@ -19,7 +19,8 @@ sub build_server { 'k|keep-alive-timeout=i' => sub { $daemon->keep_alive_timeout($_[1]) }, 'l|listen=s' => \my @listen, 'p|proxy:s' => \my @proxy, - 'r|requests=i' => sub { $daemon->max_requests($_[1]) }; + 'r|requests=i' => sub { $daemon->max_requests($_[1]) }, + 's|silent' => sub { $daemon->silent(1) }; $daemon->listen(\@listen) if @listen; $daemon->reverse_proxy(1) if @proxy; @@ -46,7 +47,7 @@ Mojolicious::Command::daemon - Daemon command ./myapp.pl daemon -m production -p -l http://*:8080 ./myapp.pl daemon -l http://127.0.0.1:8080 -l https://[::]:8081 ./myapp.pl daemon -l 'https://*:443?cert=./server.crt&key=./server.key' - ./myapp.pl daemon -l http+unix://%2Ftmp%2Fmyapp.sock + ./myapp.pl daemon -l http+unix://%2Ftmp%2Fmyapp.sock -s ./myapp.pl daemon -l http://127.0.0.1:8080 -p 127.0.0.0/8 -p fc00::/7 Options: @@ -75,6 +76,7 @@ Mojolicious::Command::daemon - Daemon command networks -r, --requests Maximum number of requests per keep-alive connection, defaults to 100 + -s, --silent Disable the startup banner =head1 DESCRIPTION