From d8727c5a832fa760e1f62a0fb2aa00b6667727af Mon Sep 17 00:00:00 2001 From: Linnnus Date: Sat, 21 Oct 2023 13:20:03 +0200 Subject: on-demand-minecraft: Print service lifetime in show-minecraft.sh --- modules/nixos/on-demand-minecraft/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/nixos/on-demand-minecraft/default.nix b/modules/nixos/on-demand-minecraft/default.nix index d0113d6..3ccbec9 100644 --- a/modules/nixos/on-demand-minecraft/default.nix +++ b/modules/nixos/on-demand-minecraft/default.nix @@ -306,6 +306,7 @@ in { # down. It uses mcping to get the player list. It does not continue if # the server was started less than `minimum-server-lifetime` seconds # ago. + # # NOTE: `pkgs.mcping` is declared my personal monorepo. Hopefully # everything just works out through the magic of flakes, but if you are # getting errors like "missing attribute 'mcping'" that's probably why. @@ -314,7 +315,7 @@ in { serviceelapsedsec="$(( $(date +%s) - servicestartsec))" if [ $serviceelapsedsec -lt ${toString cfg.minimum-server-lifetime} ]; then - echo "Server is too young to be stopped (minimum lifetime is ${toString cfg.minimum-server-lifetime}s)" + echo "Server is too young to be stopped (minimum lifetime is ${toString cfg.minimum-server-lifetime}s, current is ''${serviceelapsedsec}s)" exit 1 fi -- cgit v1.2.3