From 6b49d69a4c994c42b0a75da3f346f1d06331d8e5 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Sun, 15 Mar 2026 15:27:05 +0100 Subject: [PATCH] cron: inline env setup in crontab command; drop variable assignments Classic cron does not support variable assignments in the crontab. Inline PLAN9, PATH, DISPLAY, and NAMESPACE exports directly in the cron command, expanded at install time from the user's environment. Co-Authored-By: Claude Sonnet 4.6 --- mkfile | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mkfile b/mkfile index e8f3b67..37ce854 100644 --- a/mkfile +++ b/mkfile @@ -58,11 +58,9 @@ install:V: build cron-install:V: mkdir -p $HOME/.local/share/anvillm - crontab -l 2>/dev/null | grep -v 'anvillm-supervisor' | grep -v '^PLAN9=' | grep -v '^PATH=' >/tmp/crontab.new || true - echo "PLAN9=$HOME/plan9" >>/tmp/crontab.new - echo "PATH=$PATH" >>/tmp/crontab.new - echo "*/5 * * * * $HOME/bin/anvillm-supervisor --orphans >>$HOME/.local/share/anvillm/worker-check.log 2>&1" >>/tmp/crontab.new - echo "*/1 * * * * $HOME/bin/anvillm-supervisor --nudge >>$HOME/.local/share/anvillm/worker-check.log 2>&1" >>/tmp/crontab.new + crontab -l 2>/dev/null | grep -v 'anvillm-supervisor' >/tmp/crontab.new || true + echo "*/5 * * * * export PLAN9=$HOME/plan9; export PATH=$HOME/bin:$HOME/go/bin:$PLAN9/bin:/usr/local/bin:/usr/bin:/bin; export DISPLAY=$DISPLAY; export NAMESPACE=$NAMESPACE; $HOME/bin/anvillm-supervisor --orphans >>$HOME/.local/share/anvillm/worker-check.log 2>&1" >>/tmp/crontab.new + echo "*/1 * * * * export PLAN9=$HOME/plan9; export PATH=$HOME/bin:$HOME/go/bin:$PLAN9/bin:/usr/local/bin:/usr/bin:/bin; export DISPLAY=$DISPLAY; export NAMESPACE=$NAMESPACE; $HOME/bin/anvillm-supervisor --nudge >>$HOME/.local/share/anvillm/worker-check.log 2>&1" >>/tmp/crontab.new crontab /tmp/crontab.new rm /tmp/crontab.new echo "cron installed: anvillm-supervisor (orphans: every 5m, nudge: every 1m)"