From 709df68db2b9afc68d54876fb9696b5090a3107c Mon Sep 17 00:00:00 2001 From: tdback Date: Sun, 16 Mar 2025 13:19:27 -0400 Subject: scripts/motd: add leading zero when checking time of day --- modules/scripts/motd/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/scripts/motd/default.nix b/modules/scripts/motd/default.nix index 5185797..3ed8ae7 100644 --- a/modules/scripts/motd/default.nix +++ b/modules/scripts/motd/default.nix @@ -1,3 +1,7 @@ +# modules/scripts/motd/default.nix +# +# Display a welcome message when remoting into servers. + { config, lib, @@ -17,7 +21,7 @@ let ENDCOLOR="\e[0m" case "$(date +'%H')" in - [0-9]|1[0-1]) + 0[0-9]|1[0-1]) TIME="morning" ;; 1[2-7]) -- cgit v1.2.3