Fix: Use absolute paths in install-systemd.sh
This commit is contained in:
+7
-4
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user