sys-updater
by @spiceman161
System package maintenance for Ubuntu (apt), npm, brew, and OpenClaw skills. Conservative workflow with 2-day quarantine for non-security updates, automatic...
clawhub install sys-updaterπ About This Skill
name: sys-updater description: Production-safe Ubuntu maintenance orchestrator: runs daily apt security updates, tracks non-security updates across apt/npm/pnpm/brew with quarantine + auto-review, applies only approved updates, rotates logs/state, and generates clear 09:00 MSK Telegram reports (including what was actually installed). metadata: { "openclaw": { "emoji": "π", "os": ["linux"], "requires": { "bins": ["apt-get", "npm", "brew", "clawhub"] }, }, }
System Updater (sys-updater)
Comprehensive system maintenance automation for Ubuntu hosts with support for apt, npm, brew, and OpenClaw skills.
What this skill does
sys-updater is a conservative maintenance pipeline for Linux hosts running OpenClaw.
It separates security patching from feature upgrades, keeps auditable state files, and sends a human-readable daily report.
Core capabilities
apt-get update
- automatic security updates via unattended-upgrade
- non-security upgrades only from explicit planned list
Workflow
Daily (06:00 MSK)
run_6am:
βββ apt: update, security upgrades, simulate, track non-security
βββ npm/brew: check outdated, add to tracking
βββ skills: auto-update immediately (no quarantine)
Report (09:00 MSK)
T+2 Days (Review)
T+3 Days (Upgrade)
State Files
state/apt/last_run.json β Last run resultsstate/apt/tracked.json β APT packages being trackedstate/apt/npm_tracked.json β NPM packagesstate/apt/brew_tracked.json β Brew packagesstate/logs/apt_maint.log β Daily logs (10-day rotation)Manual Commands
# Daily maintenance (runs automatically)
./scripts/apt_maint.py run_6amGenerate report
./scripts/apt_maint.py report_9amCheck npm/brew only
./scripts/pkg_maint.py checkReview packages (after 2 days)
./scripts/pkg_maint.py reviewApply planned upgrades
./scripts/pkg_maint.py upgradeUpdate skills only
./scripts/pkg_maint.py skills
Configuration
Environment variables:
SYS_UPDATER_BASE_DIR β Base directory (default: ~/clawd/sys-updater)SYS_UPDATER_STATE_DIR β State files locationSYS_UPDATER_LOG_DIR β Log files locationCron Jobs
Requires 4 cron jobs:
1. run_6am β Daily 06:00 MSK (apt + check npm/brew + auto skills)
2. report_9am β Daily 09:00 MSK (Telegram report)
3. review_2d β T+2 days 09:00 MSK (web search bugs)
4. upgrade_3d β T+3 days 06:00 MSK (apply planned)
Conservative Design
Requirements
Sudoers Configuration
For unattended operation, grant the running user passwordless sudo for specific apt commands only. Do not add the user to full sudoers.
Create file /etc/sudoers.d/sys-updater:
# Allow sys-updater to run apt maintenance commands without password
Replace 'username' with your actual username
username ALL=(root) NOPASSWD: /usr/bin/apt-get update
username ALL=(root) NOPASSWD: /usr/bin/apt-get -s upgrade
username ALL=(root) NOPASSWD: /usr/bin/unattended-upgrade -d
Set secure permissions:
sudo chmod 440 /etc/sudoers.d/sys-updater
sudo visudo -c # Verify syntax is valid
Required Commands Explained
| Command | Purpose |
|---------|---------|
| apt-get update | Refresh package lists |
| apt-get -s upgrade | Simulate upgrade (dry-run, no actual changes) |
| unattended-upgrade -d | Apply security updates automatically |
Security Notes
apt-get upgrade without -s (simulation only for tracking)apt-get dist-upgrade or autoremoveβοΈ Configuration
Environment variables:
SYS_UPDATER_BASE_DIR β Base directory (default: ~/clawd/sys-updater)SYS_UPDATER_STATE_DIR β State files locationSYS_UPDATER_LOG_DIR β Log files location