From c9e2452314d53a573c2c71c4512415136e5fa717 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 27 Feb 2026 11:49:43 -0600 Subject: [PATCH] fix: handle paths with spaces in install script - Add INSTALL_DIR variable with absolute path resolution - Handles spaces in directory names correctly - Uses cd/pwd trick for robust path detection --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 1b48c93..efad8b8 100644 --- a/install.sh +++ b/install.sh @@ -45,6 +45,9 @@ fi echo "" echo "Creating systemd service..." +# Get absolute path (handles spaces) +INSTALL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + cat > /tmp/mem-qdrant-watcher.service << EOF [Unit] Description=TrueRecall Base - Real-Time Memory Watcher @@ -53,13 +56,13 @@ After=network.target [Service] Type=simple User=$USER -WorkingDirectory=$(pwd)/watcher +WorkingDirectory=$INSTALL_DIR/watcher Environment="QDRANT_URL=http://$QDRANT_IP:6333" Environment="QDRANT_COLLECTION=memories_tr" Environment="OLLAMA_URL=http://$OLLAMA_IP:11434" Environment="EMBEDDING_MODEL=snowflake-arctic-embed2" Environment="USER_ID=$USER_ID" -ExecStart=/usr/bin/python3 $(pwd)/watcher/realtime_qdrant_watcher.py --daemon +ExecStart=/usr/bin/python3 $INSTALL_DIR/watcher/realtime_qdrant_watcher.py --daemon Restart=always RestartSec=5