From bf396972b0983aa6302ab5d4e98a459ea3968462 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Mon, 22 Jun 2026 19:12:31 +0200 Subject: [PATCH] fix: bake STACKS_DIR into systemd service units at install time The update and backup services ran without STACKS_DIR since systemd doesn't source ~/.env or ~/.zshrc. Capture the value at install time and write it as Environment= in the generated unit files. Co-Authored-By: Claude Sonnet 4.6 --- bin/stacks | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bin/stacks b/bin/stacks index d694fbb..4a62183 100755 --- a/bin/stacks +++ b/bin/stacks @@ -475,6 +475,7 @@ Type=oneshot User=root ExecStart=${_self} update run Environment=HOME=/root +Environment=STACKS_DIR=${STACKS_DIR} EOF cat > /etc/systemd/system/stacks-update.timer << 'EOF' [Unit] @@ -632,6 +633,7 @@ Type=oneshot User=root ExecStart=${_self} backup run Environment=HOME=/root +Environment=STACKS_DIR=${STACKS_DIR} EOF cat > /etc/systemd/system/stacks-backup.timer << 'EOF' [Unit]