Files
markdown_editor/start.sh
2025-10-26 11:05:59 +04:00

27 lines
789 B
Bash
Executable File

#!/bin/bash
set -e
# Change to the script's directory to ensure relative paths work
cd "$(dirname "$0")"
echo "=============================================="
echo "Markdown Editor v3.0 - WebDAV Server"
echo "=============================================="
if ! command -v uv &> /dev/null; then
echo "Installing uv..."
curl -LsSf https://astral.sh/uv/install.sh | sh
export PATH="$HOME/.cargo/bin:$PATH"
fi
if [ ! -d ".venv" ]; then
echo "Creating virtual environment..."
uv venv
fi
echo "Activating virtual environment..."
source .venv/bin/activate
echo "Installing dependencies..."
uv pip install wsgidav cheroot pyyaml
PORT=8004
echo "Checking for process on port $PORT..."
lsof -ti:$PORT | xargs -r kill -9
echo "Starting WebDAV server..."
python server_webdav.py