From 9b52c19d86bc47933e58d6818591f0e36b627dc3 Mon Sep 17 00:00:00 2001 From: Ed Nielsen Date: Wed, 18 Mar 2026 15:02:54 +0100 Subject: [PATCH] Update README with first-time setup guide --- README.md | 129 +++++++++++++++++++++++++++--------------------------- 1 file changed, 64 insertions(+), 65 deletions(-) diff --git a/README.md b/README.md index b1d1440..48fdada 100644 --- a/README.md +++ b/README.md @@ -1,113 +1,112 @@ # Update Manager -Lightweight SSH-based update manager for Linux systems. +Simple tool to check for available updates on multiple Linux servers via SSH. --- -## Features +## 🚀 First Time Setup -- Check for updates across multiple hosts -- SSH-based (no agents) -- Simple host inventory -- No external dependencies +### 1. Install script + +```bash +sudo mkdir -p /opt/update-manager +sudo cp update-manager.sh /opt/update-manager/ +sudo chmod +x /opt/update-manager/update-manager.sh + +sudo ln -s /opt/update-manager/update-manager.sh /usr/local/bin/update-manager +``` --- -## Installation +### 2. Run for the first time -git clone -cd update-manager -chmod +x update-manager.sh -./update-manager.sh install +```bash +update-manager check +``` -This will: +This will automatically create: -- Install the tool in /opt/update-manager -- Create global command: update-manager -- Create config files if missing +``` +/opt/update-manager/hosts.conf +``` --- -## Configuration - -Edit hosts: +### 3. Edit hosts file +```bash nano /opt/update-manager/hosts.conf - -Format: - -name ip ssh_user +``` Example: -server1 192.168.1.10 user -server2 192.168.1.20 user +```bash +# name ip user +server1 192.168.1.10 user +server2 192.168.1.20 user +``` --- -## SSH (required) +### 4. Setup SSH access (required) -Passwordless SSH must be configured. +From your main machine: -ssh-keygen -t ed25519 +```bash ssh-copy-id user@192.168.1.10 +ssh-copy-id user@192.168.1.20 +``` -Repeat for all hosts. - -Test: - -ssh user@192.168.1.10 - -Should work without password. +Passwordless SSH is required for the tool to work. --- -## Usage +### 5. Run again +```bash update-manager check +``` --- -## Output +## ✅ Example output -server1 🔴 2 updates -server2 🟢 up-to-date -server3 ❌ connection failed +```bash +===== server1 (192.168.1.10) ===== +Up-to-date + +===== server2 (192.168.1.20) ===== +vim-common ... +``` --- -## Config +## ⚠️ Requirements -/etc/update-manager.conf - -Default: - -HOSTS_FILE="/opt/update-manager/hosts.conf" -SSH_OPTIONS="-o BatchMode=yes -o ConnectTimeout=5" +* SSH access to all servers +* SSH keys configured (`ssh-copy-id`) +* Debian/Ubuntu-based systems --- -## Notes +## 📁 Hosts file format -- hosts.conf and update-manager.conf are local files (not in Git) -- .example files are templates -- Existing config is not overwritten on reinstall +``` +name ip user +``` + +Example: + +``` +web 192.168.1.10 ubuntu +db 192.168.1.20 root +``` --- -## Roadmap +## 🧠 Notes -- update command -- parallel execution -- scheduled checks -- logging integration - ---- - -## Philosophy - -Keep it simple. - -- No agents -- No dependencies -- Just SSH +* The hosts file is created automatically on first run +* Lines starting with `#` are ignored +* Empty lines are ignored +* Requires passwordless SSH access