From ed99ce6a2af7c51b4e7530f875b5b0b74773b9c2 Mon Sep 17 00:00:00 2001 From: Connor Johnstone Date: Thu, 17 Sep 2026 12:32:39 -0400 Subject: [PATCH] movie_recs_notify: resolve movie_recs next to itself RECS was the absolute path /home/connor/.local/bin/movie_recs. That worked while ~/.local/bin was a dotbot link into hosts//bin, but base.conf.yaml now *creates* it as a real directory owned by the package managers, so the movie_recs link went away with it. Every timer run since died on FileNotFoundError before reaching LiteLLM, which is why the ntfy push went quiet rather than reporting a failure. The unit already invokes this script as %h/.dotfiles/hosts/mainframe/bin/..., so deriving the sibling path from __file__ cannot drift from however the unit is spelled, and does not care what ~/.local/bin becomes next. --- hosts/mainframe/bin/movie_recs_notify | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hosts/mainframe/bin/movie_recs_notify b/hosts/mainframe/bin/movie_recs_notify index 5fd9b33..abfb14d 100755 --- a/hosts/mainframe/bin/movie_recs_notify +++ b/hosts/mainframe/bin/movie_recs_notify @@ -16,7 +16,12 @@ NTFY = "https://ntfy.rcjohnstone.com/movies" # credential. Mirrored from the rbw entry `ntfy-bot`; rbw is the source of # truth. Kept in a 0600 file because this runs unattended from a timer. NTFY_ENV = os.path.expanduser("~/.config/ntfy/publish.env") -RECS = "/home/connor/.local/bin/movie_recs" +# Resolved next to this script, not via ~/.local/bin. That directory used to +# be a dotbot link into hosts//bin; it is now a real directory owned by +# the package managers (meta/base.conf.yaml), so the movie_recs link vanished +# and every run since died with FileNotFoundError. The sibling path is what +# the unit already uses for this script itself and cannot drift from it. +RECS = os.path.join(os.path.dirname(os.path.abspath(__file__)), "movie_recs") COUNT = "10"