From ac534b9241bdb969b30ae2d745d66e0bda540e96 Mon Sep 17 00:00:00 2001 From: Bumblebee Date: Sun, 26 Apr 2026 06:20:35 +0200 Subject: [PATCH] Fix: Use absolute paths in install-systemd.sh --- install-systemd.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/install-systemd.sh b/install-systemd.sh index 1193bd0..28e57ea 100755 --- a/install-systemd.sh +++ b/install-systemd.sh @@ -6,6 +6,9 @@ set -e echo "📦 Installing Obsidian systemd services..." +# Get script directory (absolute path) +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" + # Check if running as root if [ "$EUID" -ne 0 ]; then echo "❌ This script must be run with sudo" @@ -15,12 +18,12 @@ fi # Install dependencies echo "Installing dependencies..." apt-get update -qq -apt-get install -y -qq xvfb xvfb-run +apt-get install -y -qq xvfb -# Copy service files +# Copy service files (using absolute paths) echo "Installing systemd services..." -cp obsidian.service /etc/systemd/system/obsidian.service -cp obsidian-mcp.service /etc/systemd/system/obsidian-mcp.service +cp "$SCRIPT_DIR/obsidian.service" /etc/systemd/system/obsidian.service +cp "$SCRIPT_DIR/obsidian-mcp.service" /etc/systemd/system/obsidian-mcp.service # Fix permissions chmod 644 /etc/systemd/system/obsidian.service