Fix onyx_data directory path to riotsecure repo

- Update all references from ~/onyx_data to ~/riotsecure/onyx_data
- Restructure setup.sh to clone repository before Onyx installation
- Ensure Onyx installer runs from within riotsecure directory
- Update step numbers in setup.sh (now steps 1-8)
- Fix paths in check-status.sh and README.md

This ensures onyx_data is created in the correct location
where the install script is run (~/riotsecure).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
cediackermann 2026-04-16 10:29:42 +02:00
parent eea1d5d729
commit 802d4aa904
3 changed files with 42 additions and 33 deletions

View file

@ -81,7 +81,7 @@ When prompted:
2. Choose **2** for Standard
3. Press **Enter** for Edge
Onyx creates `~/onyx_data/`, which contains the Docker Compose file (useful for manually stopping or modifying images). There is also a `.env` file — leave it untouched.
Onyx creates `~/riotsecure/onyx_data/`, which contains the Docker Compose file (useful for manually stopping or modifying images). There is also a `.env` file — leave it untouched.
### Prevent Sleep

View file

@ -158,12 +158,12 @@ fi
# =============================================================================
print_section "Onyx"
if [ -d ~/onyx_data ]; then
if [ -d ~/riotsecure/onyx_data ]; then
echo -e "$PASS Onyx data directory exists"
# Check if Onyx containers are running
if command -v docker &> /dev/null && docker info &> /dev/null; then
cd ~/onyx_data 2>/dev/null
cd ~/riotsecure/onyx_data 2>/dev/null
if [ -f "docker-compose.yaml" ] || [ -f "docker-compose.yml" ]; then
echo -e "$PASS Docker Compose file found"
@ -174,7 +174,7 @@ if [ -d ~/onyx_data ]; then
docker ps --filter "name=onyx" --format " $INFO {{.Names}} ({{.Status}})"
else
echo -e "$WARN No Onyx containers running"
echo -e " ${INFO} Start with: cd ~/onyx_data && docker compose up -d"
echo -e " ${INFO} Start with: cd ~/riotsecure/onyx_data && docker compose up -d"
OVERALL_STATUS=1
fi
fi
@ -258,7 +258,7 @@ else
echo "Common fixes:"
echo " • Docker not running → Open Docker Desktop"
echo " • Ollama not running → Run: ollama serve"
echo " • Onyx not running → cd ~/onyx_data && docker compose up -d"
echo " • Onyx not running → cd ~/riotsecure/onyx_data && docker compose up -d"
echo " • Low disk space → Free up disk space"
echo ""
exit 1

View file

@ -179,9 +179,28 @@ else
fi
# =============================================================================
# STEP 3: Docker Desktop
# STEP 3: Clone Repository
# =============================================================================
print_step "STEP 3: Installing Docker Desktop"
print_step "STEP 3: Setting up Repository"
# Clone or update the repository first, as Onyx will be installed here
if [ -d ~/riotsecure ]; then
print_warning "riotsecure directory already exists"
cd ~/riotsecure
git pull
print_success "Repository updated"
else
print_warning "Cloning riotsecure repository..."
cd ~
git clone https://github.com/cediackermann/riotsecure.git
cd ~/riotsecure
print_success "Repository cloned"
fi
# =============================================================================
# STEP 4: Docker Desktop
# =============================================================================
print_step "STEP 4: Installing Docker Desktop"
if [ -d "/Applications/Docker.app" ]; then
print_success "Docker Desktop is already installed"
@ -220,11 +239,11 @@ done
print_success "Docker is ready"
# =============================================================================
# STEP 4: Onyx
# STEP 5: Onyx
# =============================================================================
print_step "STEP 4: Installing Onyx"
print_step "STEP 5: Installing Onyx"
if [ -d ~/onyx_data ]; then
if [ -d ~/riotsecure/onyx_data ]; then
print_warning "Onyx data directory already exists. Skipping installation."
else
print_warning "Installing Onyx..."
@ -234,6 +253,9 @@ else
echo " 3. Press ENTER for Edge"
echo ""
# Ensure we're in the riotsecure directory so onyx_data is created there
cd ~/riotsecure
# Download and run Onyx installer
# Note: The interactive prompts need to be handled by the user
curl -fsSL https://onyx.app/install_onyx.sh | bash
@ -247,25 +269,12 @@ sudo pmset -a sleep 0 disksleep 0
print_success "Sleep prevention configured"
# =============================================================================
# STEP 5: Ollama Models
# STEP 6: Ollama Models
# =============================================================================
print_step "STEP 5: Setting up Ollama Models"
print_step "STEP 6: Setting up Ollama Models"
# Check if we're already in the riotsecure directory
if [ ! -f "./updateModels.sh" ]; then
if [ -d ~/riotsecure ]; then
print_warning "riotsecure directory already exists"
# Ensure we're in the riotsecure directory
cd ~/riotsecure
git pull
else
print_warning "Cloning riotsecure repository..."
cd ~
git clone https://github.com/cediackermann/riotsecure.git
cd ~/riotsecure
fi
else
print_success "Already in riotsecure directory"
fi
print_warning "Creating Ollama models from modelfiles..."
if [ -f "./updateModels.sh" ]; then
@ -277,9 +286,9 @@ else
fi
# =============================================================================
# STEP 6: Web Interface Configuration
# STEP 7: Web Interface Configuration
# =============================================================================
print_step "STEP 6: Web Interface Configuration"
print_step "STEP 7: Web Interface Configuration"
echo ""
echo "MANUAL STEPS REQUIRED:"
@ -299,9 +308,9 @@ echo ""
wait_for_user
# =============================================================================
# STEP 7: RAG Content Upload
# STEP 8: RAG Content Upload
# =============================================================================
print_step "STEP 7: RAG Content Upload"
print_step "STEP 8: RAG Content Upload"
echo "Choose content upload method:"
echo " A - Upload as File (recommended)"
@ -372,8 +381,8 @@ fi
echo ""
echo "Useful commands:"
echo " - View Onyx logs: cd ~/onyx_data && docker compose logs -f"
echo " - Restart Onyx: cd ~/onyx_data && docker compose restart"
echo " - View Onyx logs: cd ~/riotsecure/onyx_data && docker compose logs -f"
echo " - Restart Onyx: cd ~/riotsecure/onyx_data && docker compose restart"
echo " - List Ollama models: ollama list"
echo " - Update Ollama models: cd ~/riotsecure && ./updateModels.sh modelfiles"
echo ""