Add README.md for Auto-Boot Ollama Host project

Introduce a comprehensive README file detailing the project's purpose, features, environment variables, usage instructions, project structure, and how it operates. This addition enhances documentation and provides clarity for users and developers.
This commit is contained in:
Bastian (BaM)
2025-09-14 21:34:43 +02:00
parent fed3cdc728
commit fff635c2d7
2 changed files with 105 additions and 8 deletions

View File

@@ -1,13 +1,12 @@
# Auto-Boot Ollama Host - Refactored Structure
# Auto-Boot Ollama Host
This directory contains the refactored version of the auto-boot-ollama-host script, split into multiple modules for better maintainability and structure.
This directory contains the auto-boot-ollama-host script, organized into multiple modules for better maintainability and structure.
## File Structure
### Main Script
- `auto-boot-ollama-host.lua` - Original monolithic script
- `auto-boot-ollama-host-refactored.lua` - New modular main script
- `auto-boot-ollama-host.lua` - Main script that orchestrates all functionality
### Modules
@@ -55,7 +54,7 @@ Windows desktop session detection:
- `is_user_logged_in_enhanced(config)` - Check if user is logged into desktop session
## Benefits of Refactoring
## Benefits of Modular Structure
1. **Separation of Concerns**: Each module has a single responsibility
2. **Reusability**: Modules can be reused in other projects
@@ -68,7 +67,7 @@ Windows desktop session detection:
### Desktop Session Detection
The refactored version now includes Windows desktop session detection:
The script includes Windows desktop session detection:
- Checks if the SSH_USER is currently logged into a Windows desktop session
- If user is logged in, skips Ollama startup/shutdown to avoid interruption
@@ -76,10 +75,10 @@ The refactored version now includes Windows desktop session detection:
## Usage
To use the refactored version, simply run:
To use the script, simply run:
```bash
lua auto-boot-ollama-host.lua
```
The refactored version maintains full compatibility with the original script while providing better structure and maintainability.
The script provides a modular structure for better maintainability while maintaining all functionality.