From e1904b85d964a803a48dc9340af4bf10ac3f983c Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Tue, 9 Dec 2025 01:38:55 +0100 Subject: [PATCH] simplify seq-command module --- modules/seq-command.nix | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/modules/seq-command.nix b/modules/seq-command.nix index 5a8932e..98d1c8d 100644 --- a/modules/seq-command.nix +++ b/modules/seq-command.nix @@ -3,7 +3,6 @@ let seqCommandScript = pkgs.writeShellScriptBin "seq-command" '' gap=0 - service=false file="" while [[ $# -gt 0 ]]; do @@ -12,10 +11,6 @@ let gap="$2" shift 2 ;; - --service) - service=true - shift - ;; *) file="$1" shift @@ -26,11 +21,10 @@ let if [[ -z "$file" || "$gap" -eq 0 ]]; then echo "seq-command - Execute commands from a file sequentially with gaps" echo "" - echo "Usage: seq-command --gap [--service] " + echo "Usage: seq-command --gap " echo "" echo "Options:" echo " --gap Wait time between command executions" - echo " --service Run as a background systemd user service" echo "" echo "The commands file is treated as a FIFO queue - each line is removed after execution." exit 1 @@ -43,10 +37,6 @@ let exit 1 fi - if $service; then - exec systemd-run --user --unit="seq-command-$(date +%s)" seq-command --gap "$gap" "$file" - fi - gap_seconds=$((gap * 60)) while [[ -s "$file" ]]; do