Repository navigation
v1.1.0 - Foundation Scripts
v1.1.0 - Foundation Scripts
Phase 1 of the homelab automation scripts is complete! This release introduces three new production-ready scripts for certificate monitoring, database backups, and service health checks.
🎉 New Scripts
cert-renewal-check.sh
SSL certificate expiry monitoring and renewal automation.
Features:
- ✅ Check domain certificates via HTTPS connection
- ✅ Inspect local certificate files
- ✅ Configurable warning threshold (default: 30 days, range: 1-365)
- ✅ Table and JSON output formats
- ✅ Optional certbot auto-renewal integration
- ✅ Dry-run mode for testing
- ✅ Cross-platform (macOS/Linux)
Example:
./cert-renewal-check.sh --domains domains.txt --warn-days 30 --jsondb-backup.sh
Automated PostgreSQL/MySQL backups with intelligent retention policies.
Features:
- ✅ PostgreSQL and MySQL support with DSN-based configuration
- ✅ Configurable retention (daily:weekly:monthly format, default: 7:4:12)
- ✅ Automatic gzip compression
- ✅ Optional rclone cloud sync for off-site backups
- ✅ Test restore validation (PostgreSQL only)
- ✅ DSN password masking in all output
- ✅ Table and JSON output formats
Example:
export DB_DSN="postgres://user:pass@localhost:5432/mydb"
./db-backup.sh --db pg --out ./backups --retention 7:4:12service-health-check.sh
Config-driven uptime monitoring with multiple check types.
Features:
- ✅ HTTP endpoint checks with status code and body validation
- ✅ TCP port connectivity checks
- ✅ Process monitoring via pgrep
- ✅ Docker container status checks
- ✅ Watch mode with continuous monitoring
- ✅ State tracking with change detection
- ✅ Webhook notifications on state changes
- ✅ INI-style configuration format
Example:
./service-health-check.sh --config services.conf --watch --interval 60 \
--notify webhook:http://alerts.local/webhook🔧 Bug Fixes
- disk-cleanup.sh: Fixed unbound variable error in manifest check for
--scan-venvs
📊 Quality Standards
All scripts in this release meet comprehensive quality standards:
- ✅ Full CI/CD coverage - Smoke tests in GitHub Actions
- ✅ ShellCheck validated - Zero warnings or errors
- ✅ Security hardened - Secure logging, input validation, no secrets in CLI args
- ✅ Cross-platform - Tested on both macOS and Linux
- ✅ Well documented - Comprehensive README sections with examples
- ✅ Example configs - Ready-to-use configuration files
📦 Installation
# Clone the repository
git clone https://github.com/adrianwedd/homelab-scripts.git
cd homelab-scripts
# Make scripts executable
chmod +x *.sh
# Run with --help to see options
./cert-renewal-check.sh --help
./db-backup.sh --help
./service-health-check.sh --help🚀 What's Next
Phase 2 (v1.2.0) will focus on Docker operations:
compose-redeploy.sh- Safe Docker Compose updates with rollbackdocker-volume-backup.sh- Consistent volume snapshotsdyndns-update.sh- Dynamic DNS updates for homelabs
See ROADMAP.md for the complete development plan.
📝 Full Changelog
See CHANGELOG.md for detailed changes.