diff --git a/README.md b/README.md index 6a94220..dc3900b 100644 --- a/README.md +++ b/README.md @@ -1,158 +1,243 @@
-
+
+
+
+
+
+ Lightweight • No dependencies • Works over SSH +
+ +--- + +## Quick Install ```bash -git clone https://git.lanx.dk/ed/subfox.git -cd subfox +git clone https://github.com/YOUR-USER/update-manager.git +cd update-manager + +sudo apt update +sudo apt install dialog openssh-client + +sudo mkdir -p /opt/update-manager +sudo cp update-manager.sh update-manager-ui.sh dialogrc /opt/update-manager/ + +sudo chmod +x /opt/update-manager/update-manager.sh +sudo chmod +x /opt/update-manager/update-manager-ui.sh + +sudo ln -s /opt/update-manager/update-manager.sh /usr/local/bin/update-manager +sudo ln -s /opt/update-manager/update-manager-ui.sh /usr/local/bin/update-manager-ui ``` --- -### 2. Setup environment +## SSH Setup (Required) -Create `.env`: +Update Manager uses SSH to connect to your hosts. -```env -OPENAI_API_KEY=your_api_key_here -``` +You must have SSH key-based authentication set up (no password prompts). ---- - -### 3. Start with Docker +### Generate SSH key (if not already done) ```bash -docker compose up -d --build +ssh-keygen -t ed25519 ``` --- -### 4. Open in browser +### Copy key to hosts -``` -http://localhost:8000 +```bash +ssh-copy-id user@192.168.1.10 +ssh-copy-id user@192.168.1.20 +ssh-copy-id user@192.168.1.30 ``` --- -## 🧠 How it Works +### Test connection -```text -Upload SRT - ↓ -Parse blocks - ↓ -Batch translation (packed) - ↓ -Cache lookup - ↓ -OpenAI (if needed) - ↓ -Fallback per-line (if mismatch) - ↓ -Return translated subtitles +```bash +ssh user@192.168.1.10 +``` + +You should be able to connect **without entering a password**. + +> ⚠️ If SSH is not configured, the tool will fail or hang during execution. + +--- + +## Configuration + +### Copy config files + +```bash +cp update-manager.conf.example update-manager.conf +cp hosts.conf.example hosts.conf ``` --- -## 💾 Cache System +### Edit hosts -SubFox uses a disk-based cache: - -* Stored in `/data/cache` -* Persisted via Docker volume -* One file per translation (hashed key) +```bash +nano hosts.conf +``` Example: -```text -/data/cache/en_da/ -├── a1b2c3d4.json -├── f6g7h8i9.json +```bash +# name ip user +server1 192.168.1.10 user +server2 192.168.1.20 user +server3 192.168.1.30 user ``` --- -## 🐳 Docker Configuration +## Usage -Example volume setup: - -```yaml -volumes: - - ./uploads:/app/uploads - - ./outputs:/app/outputs - - /mnt/user/appdata/subfox/cache:/data/cache -``` - ---- - -## 📡 API - -### Version endpoint +### Check updates ```bash -GET /version +update-manager check ``` -Response: +### Start UI -```json -{ - "version": "0.1.0" -} +```bash +update-manager-ui ``` --- -## 📜 Changelog +## Logging -See [CHANGELOG.md](CHANGELOG.md) +Log file location: + +```bash +/opt/update-manager/log/update-manager.log +``` + +View log: + +```bash +less /opt/update-manager/log/update-manager.log +``` + +Follow log: + +```bash +tail -f /opt/update-manager/log/update-manager.log +``` --- -## 🛠 Tech Stack +## File Structure -* Python 3.11 -* FastAPI -* OpenAI API -* Docker -* JSON-based disk cache +```bash +/opt/update-manager/ +├── update-manager.sh +├── update-manager-ui.sh +├── update-manager.conf +├── hosts.conf +├── log/ +│ └── update-manager.log +``` + +--- + +## How it works + +* Uses SSH to connect to each host +* Runs `apt` commands remotely +* Logs results locally +* No agents or services needed +* Designed for simple and efficient operations + +--- + +## Requirements + +* SSH access to all hosts +* SSH keys recommended (no password prompts) +* Ubuntu/Debian-based systems + +--- + +## Future ideas + +* 🔔 Notifications (ntfy / push alerts) +* 🌐 Web interface +* 📧 Email reporting +* 📊 Basic monitoring (status, last check, pending updates) +* 🧩 Plugin system (extensible modules) +* 🔐 Security & compliance checks +* 🤖 AI integration (Lanx AI) --- ## ❤️ Credits -Built with ❤️ for Lanx by [NodeFox 🦊](https://nodefox.lanx.dk) +Built with ❤️ for Lanx by [NodeFox 🦊](https://nodefox.lanx.dk) Maintained by [Eddie Nielsen](https://lanx.dk) > Learn. Adopt. Survive. Share. + +--- + +## License + +This project is licensed under the GNU GPL v3 License. + +See the LICENSE file for full details. + +---