From c14a8ab7244b48f6ae21541cb5a01ec14127483d Mon Sep 17 00:00:00 2001 From: Mark Eaton Date: Sun, 16 Nov 2025 01:41:06 -0500 Subject: [PATCH] chore: add env-based REPO_PATH config for libguides-notifier.service Co-authored-by: aider (openai/gpt-5) --- systemd/libguides-notifier.service | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/systemd/libguides-notifier.service b/systemd/libguides-notifier.service index 265891f..8aa689c 100644 --- a/systemd/libguides-notifier.service +++ b/systemd/libguides-notifier.service @@ -1,11 +1,10 @@ # User-level systemd service to run main.py # Uses a wrapper script so the working directory and .env are found correctly. -# Replace REPO_PATH automatically using the setup command we provide. -# Install step 2 does three things: -# - Replaces REPO_PATH with your repo’s absolute path in the COPY of this unit at ~/.config/systemd/user/ -# so ExecStart points to the correct scripts/run_main.sh. -# - Marks scripts/run_main.sh as executable (chmod +x). -# - Reloads user units (systemctl --user daemon-reload) so systemd picks up the updated service/timer. +# Configuration is via ~/.config/libguides-notifier.env, no in-file path edits needed. +# Create that file with one line: +# REPO_PATH=/absolute/path/to/this/repo +# Then run: +# systemctl --user daemon-reload [Unit] Description=Run main.py (LibGuides notifier) Wants=network-online.target @@ -13,7 +12,8 @@ After=network-online.target [Service] Type=oneshot -ExecStart="REPO_PATH/scripts/run_main.sh" +EnvironmentFile=%h/.config/libguides-notifier.env +ExecStart="${REPO_PATH}/scripts/run_main.sh" [Install] WantedBy=default.target