{"id":44317259,"url":"https://github.com/basher83/automation-scripts","last_synced_at":"2026-02-11T05:14:58.219Z","repository":{"id":298051852,"uuid":"998631052","full_name":"basher83/automation-scripts","owner":"basher83","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-06T18:34:25.000Z","size":352,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-07T04:04:23.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basher83.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/security/SECURITY_ACCEPTED_RISKS.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-09T02:06:25.000Z","updated_at":"2025-11-04T17:12:48.000Z","dependencies_parsed_at":"2025-09-07T01:13:39.302Z","dependency_job_id":"73baf029-fa87-44ce-b652-1eb52d5fd728","html_url":"https://github.com/basher83/automation-scripts","commit_stats":null,"previous_names":["basher83/automation-scripts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/basher83/automation-scripts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basher83%2Fautomation-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basher83%2Fautomation-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basher83%2Fautomation-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basher83%2Fautomation-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basher83","download_url":"https://codeload.github.com/basher83/automation-scripts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basher83%2Fautomation-scripts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29327151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T03:52:29.695Z","status":"ssl_error","status_checked_at":"2026-02-11T03:52:23.094Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-02-11T05:14:57.502Z","updated_at":"2026-02-11T05:14:58.214Z","avatar_url":"https://github.com/basher83.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automation Scripts\n\n[![Shell Script](https://img.shields.io/badge/shell_script-%23121011.svg?style=flat\u0026logo=gnu-bash\u0026logoColor=white)](https://github.com/basher83/automation-scripts)\n[![Ubuntu](https://img.shields.io/badge/Ubuntu-E95420?style=flat\u0026logo=ubuntu\u0026logoColor=white)](https://ubuntu.com/)\n[![Debian](https://img.shields.io/badge/Debian-D70A53?style=flat\u0026logo=debian\u0026logoColor=white)](https://www.debian.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA collection of production-ready automation scripts for DevOps and system administration tasks. All scripts are written in Bash with a focus on security, error handling, and idempotency.\n\n## Table of Contents\n\n1. [Overview](#overview)\n1. [Features](#features)\n1. [Repository Structure](#repository-structure)\n1. [Installation](#installation)\n1. [Usage](#usage)\n1. [Scripts](#scripts)\n1. [Requirements](#requirements)\n1. [Security](#security)\n1. [Development](#development)\n1. [Contributing](#contributing)\n1. [License](#license)\n\n## Overview\n\nThis repository provides battle-tested automation scripts for common infrastructure and development tasks:\n\n- **Bootstrap Scripts**: Install modern CLI tools (eza, fd, uv, ripgrep)\n- **Monitoring**: CheckMK agent installation, configuration, and removal\n- **Backup Management**: Proxmox Backup Server health checks and status monitoring\n- **Infrastructure**: Proxmox Virtual Environment utilities and exporters\n- **Firewall Management**: NFTables port management utilities\n- **Service Discovery**: Consul integration and Prometheus exporters\n- **Documentation**: Automated documentation maintenance tools\n\nAll scripts follow consistent patterns for error handling, security validation, and user interaction.\n\n## Features\n\n- **Self-contained Scripts**: Each script can run independently without external dependencies\n- **Security First**: GPG verification, checksum validation, and interactive confirmations\n- **Idempotent Design**: Safe to run multiple times without side effects\n- **Enhanced Error Handling**: Uses `set -euo pipefail` and proper trap handlers\n- **Color Output**: Smart TTY detection for colored output when appropriate\n- **Cross-Platform**: Focused on Ubuntu/Debian systems with consistent behavior\n\n## Repository Structure\n\n```tree\nautomation-scripts/\n├── bootstrap/                      # Development environment setup\n│   ├── bootstrap.sh               # Install modern CLI tools\n│   └── README.md                  # Detailed bootstrap documentation\n├── consul/                        # Consul integration tools\n│   └── prometheus/                # Prometheus exporters\n│       ├── prometheus-consul-exporter.sh\n│       └── README.md\n├── documentation/                 # Documentation utilities\n│   ├── update-trees.sh           # Update ASCII trees in docs\n│   └── README.md                 # Documentation tools guide\n├── monitoring/                    # Monitoring tools\n│   └── checkmk/                  # CheckMK monitoring\n│       ├── install-agent.sh      # Install CheckMK agent\n│       ├── uninstall-agent.sh    # Uninstall CheckMK agent\n│       └── README.md             # CheckMK setup guide\n├── nftables/                      # Firewall management\n│   ├── open-port.sh              # Port management utility\n│   └── README.md\n├── proxmox-backup-server/         # PBS utilities\n│   ├── pbs-backup-health.sh      # Check backup health status\n│   └── README.md\n├── proxmox-virtual-environment/   # PVE utilities\n│   ├── pve-backup-status.sh      # Display backup task status\n│   ├── prometheus-pve-exporter/  # Prometheus exporter\n│   │   ├── install-pve-exporter.sh\n│   │   ├── manage-pve-exporter.sh\n│   │   └── uninstall-pve-exporter.sh\n│   └── README.md\n├── CLAUDE.md                      # AI assistant guidelines\n├── CODING_STANDARDS.md            # Development standards\n├── LICENSE                        # MIT License\n└── README.md                      # This file\n```\n\n## Installation\n\n### Clone the Repository\n\n```bash\ngit clone https://github.com/basher83/automation-scripts.git\ncd automation-scripts\n```\n\n### Make Scripts Executable\n\n```bash\n# Make all scripts executable\nfind . -name \"*.sh\" -type f -exec chmod +x {} \\;\n```\n\n## Usage\n\n### Quick Start\n\nEach script is self-contained and can be run directly:\n\n```bash\n# Bootstrap development environment\n./bootstrap/bootstrap.sh\n\n# Install CheckMK monitoring agent\n./checkmk/install-agent.sh\n\n# Check Proxmox backup status\n./proxmox-virtual-environment/pve-backup-status.sh\n```\n\n### Remote Execution\n\nMany scripts support remote execution for automated deployments:\n\n```bash\n# Bootstrap script via curl\ncurl -fsSL https://raw.githubusercontent.com/basher83/automation-scripts/main/bootstrap/bootstrap.sh | bash\n\n# With environment variables for automation\ncurl -fsSL https://raw.githubusercontent.com/basher83/automation-scripts/main/bootstrap/bootstrap.sh | \\\n  EZA_SKIP_GPG_VERIFY=1 UV_INSTALL_SKIP_CONFIRM=1 bash\n```\n\n## Scripts\n\n### Bootstrap Script (`bootstrap/bootstrap.sh`)\n\nInstalls essential modern CLI tools for enhanced productivity:\n\n- **eza**: Modern replacement for `ls` with colors and Git integration\n- **fd-find**: User-friendly alternative to `find`\n- **uv**: Ultra-fast Python package installer\n- **ripgrep**: Lightning-fast recursive search tool\n\n```bash\n# Interactive installation\n./bootstrap/bootstrap.sh\n\n# Automated installation (skip confirmations)\nEZA_SKIP_GPG_VERIFY=1 UV_INSTALL_SKIP_CONFIRM=1 ./bootstrap/bootstrap.sh\n```\n\n### CheckMK Agent (`monitoring/checkmk/`)\n\nInstall, manage, and uninstall the CheckMK monitoring agent on Ubuntu/Debian systems:\n\n```bash\n# Install agent\n./monitoring/checkmk/install-agent.sh\n\n# Install with Docker plugin\n./monitoring/checkmk/install-agent.sh --docker\n\n# Uninstall agent\n./monitoring/checkmk/uninstall-agent.sh\n```\n\n### Proxmox Backup Status (`proxmox-virtual-environment/pve-backup-status.sh`)\n\nDisplays colorized backup task status from Proxmox VE logs:\n\n```bash\n# Show last 10 backup tasks (default)\n./proxmox-virtual-environment/pve-backup-status.sh\n\n# Show last 20 backup tasks\n./proxmox-virtual-environment/pve-backup-status.sh 20\n\n# Disable colors for piping/logging\n./proxmox-virtual-environment/pve-backup-status.sh 10 --no-color\n```\n\nFeatures:\n\n- Parses task logs to show backup status (OK/ERROR/UNKNOWN)\n- Displays VM names, duration, and success/failure counts\n- Supports both single VM and \"all VMs\" backup jobs\n- Auto-detects terminal color support\n\n### PBS Backup Health (`proxmox-backup-server/pbs-backup-health.sh`)\n\nChecks backup health status from Proxmox Backup Server via API:\n\n```bash\n./proxmox-backup-server/pbs-backup-health.sh\n```\n\n### Documentation Tree Updater (`documentation/update-trees.sh`)\n\nUpdates ASCII tree representations in documentation files between special marker comments:\n\n```bash\n./documentation/update-trees.sh\n```\n\n### Prometheus PVE Exporter\n\nInstall or uninstall the Prometheus exporter for Proxmox Virtual Environment:\n\n```bash\n# Install exporter\n./proxmox-virtual-environment/prometheus-pve-exporter/install-pve-exporter.sh\n\n# Uninstall exporter\n./proxmox-virtual-environment/prometheus-pve-exporter/uninstall-pve-exporter.sh\n```\n\n## Requirements\n\n### Operating System\n\n- Ubuntu 20.04+ or Debian 10+\n- x86_64 (amd64) architecture\n- Bash shell\n\n### Permissions\n\n- sudo access for system package installation\n- Read access to Proxmox logs (for status scripts)\n- API credentials for Proxmox Backup Server (where applicable)\n\n### Dependencies\n\nMost scripts automatically install their required dependencies. Common requirements include:\n\n- `curl` or `wget` for downloading\n- `gpg` for signature verification\n- `jq` for JSON processing (API scripts)\n- `ripgrep` for efficient log parsing\n\n## Security\n\n### Best Practices\n\n1. **GPG Verification**: Package installations include GPG signature verification\n1. **Checksum Validation**: Downloaded scripts are validated with SHA-256 checksums\n1. **Interactive Confirmations**: Security-sensitive operations require manual confirmation\n1. **No Stored Credentials**: Scripts never store API keys or passwords\n\n### Environment Variables\n\nFor automated deployments, these environment variables control security features:\n\n- `EZA_SKIP_GPG_VERIFY`: Skip GPG verification for eza installation\n- `UV_INSTALL_SKIP_CONFIRM`: Skip confirmation for uv installer\n\n**Warning**: Only use these in trusted, controlled environments.\n\n## Development\n\n### Code Standards\n\nAll scripts follow these conventions:\n\n```bash\n#!/bin/bash\nset -euo pipefail  # Strict error handling\n\n# Color output with TTY detection\nif [ -t 1 ]; then\n    RED='\\033[0;31m'\n    GREEN='\\033[0;32m'\n    NC='\\033[0m'\nelse\n    RED=''\n    GREEN=''\n    NC=''\nfi\n\n# Cleanup on exit\ntrap cleanup EXIT\n```\n\n### Development Environment\n\nThis repository uses [mise](https://mise.jdx.dev/) for consistent tool versions:\n\n```bash\n# Initial setup\nmise trust \u0026\u0026 mise install\n\n# Run validation\nmise run validate    # ShellCheck all scripts\nmise run format      # Format with shfmt\nmise run test        # Run test suite\n```\n\nSee [docs/development/MISE_GUIDE.md](docs/development/MISE_GUIDE.md) for complete documentation.\n\n### Testing Scripts\n\n```bash\n# Validate shell script syntax\nfind . -name \"*.sh\" -type f -exec bash -n {} \\;\n\n# Or use mise task\nmise run validate\n\n# Search codebase with ripgrep\nrg \"pattern\" --type sh\n\n# List files with modern tools\neza -la --tree --level=2\n```\n\n### CI/CD\n\n- GitHub Actions validates all shell scripts on push\n- Renovate bot manages dependency updates\n- Label definitions synced from basher83/docs repository\n\n## Contributing\n\nContributions are welcome! Please follow these guidelines:\n\n1. Fork the repository\n1. Create a feature branch (`git checkout -b feature/amazing-script`)\n1. Follow existing script patterns and conventions\n1. Test thoroughly on Ubuntu/Debian systems\n1. Update relevant documentation\n1. Submit a pull request\n\n### Script Checklist\n\n- [ ] Starts with `#!/bin/bash`\n- [ ] Uses `set -euo pipefail`\n- [ ] Includes proper error handling\n- [ ] Has color output with TTY detection\n- [ ] Cleans up resources on exit\n- [ ] Is idempotent (safe to run multiple times)\n- [ ] Includes helpful comments\n- [ ] Has a corresponding README if complex\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\nCopyright (c) 2025 basher83\n\n---\n\nFor detailed documentation on specific scripts, see the README files in each subdirectory. For AI assistant integration guidelines, refer to [CLAUDE.md](CLAUDE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasher83%2Fautomation-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasher83%2Fautomation-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasher83%2Fautomation-scripts/lists"}