From 0642685bb330cf0a09aa2d79b11585df62146a65 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 21 Feb 2024 10:52:16 +0000 Subject: [PATCH] Reduce frequence of stop-minecraft job Hopefully fix endless stop/start loop, needs testing more --- services/minecraft.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/services/minecraft.nix b/services/minecraft.nix index 80395d36..29d2547e 100644 --- a/services/minecraft.nix +++ b/services/minecraft.nix @@ -6,9 +6,9 @@ modulesPath, ... }: let - # check every 20 seconds if the server + # check every 15 minutes if the server # need to be stopped - frequency-check-players = "*-*-* *:*:0/20"; + frequency-check-players = "*-*-* *:0/15"; # time in second before we could stop the server # this should let it time to spawn @@ -166,9 +166,7 @@ in { if ${no-player-connected}/bin/no-player-connected then echo "stopping server" - systemctl stop minecraft-server.service - systemctl stop hook-minecraft.service - systemctl stop stop-minecraft.timer + systemctl stop minecraft-server.service hook-minecraft.service stop-minecraft.timer fi ''; };