This repository contains a collection of Bash scripts for various DevOps, cloud, and system administration purposes. Feel free to explore and use these scripts as needed.
- 07-simple-ssh-monitor/ - SSH brute force detection and IP blacklisting with Telegram alerts
- 08-certificate-expiration-monitor/ - SSL certificate expiration monitoring
- 16-systemd-service-manager/ - Simplified systemd service management
- 17-nginx-log-analyzer/ - Lightweight Nginx access log analyzer
- 18-disk-space-alert/ - Disk usage alerting via Telegram/Slack/Email
- 09-sync-ecr-between-account-or-profile/ - Sync AWS ECR repositories across accounts
- 10-export-kube-yaml-manifest/ - Export Kubernetes resources to YAML
- 11-cleanup-aws/ - Destructive AWS resource cleanup script
- 12-aws-s3-backup/ - Backup to AWS S3 with encryption
- 14-k8s-pod-restart/ - Kubernetes workload restart helper
- 15-postgres-backup/ - PostgreSQL database backup
- 20-aws-cost-monitor/ - Daily AWS cost monitor
- 22-k8s-namespace-cleaner/ - Stale Kubernetes resource cleanup
- 23-git-repo-syncer/ - Batch update multiple git repositories
- 24-database-connection-tester/ - Test connectivity to various databases
- 25-docker-compose-healthcheck/ - Monitor Docker Compose service health
- 05-install-docker-ubuntu/ - Docker installation on Ubuntu
- 13-docker-logs-rotate/ - Docker log rotation and cleanup
- 19-docker-image-cleanup/ - Automated Docker image/volume cleanup
- 02-find-subdomains/ - Find subdomains via crt.sh
- 03-socat/ - Socat network utilities
- 04-network-namespace/ - Network namespace management
- 06-basic-ufw-rules/ - UFW firewall setup
- 21-logs-shipper/ - Ship logs to remote server via SCP
- 01-rename-file-with-same-patern/ - Rename files with pattern matching
Backup directories and files to AWS S3 with compression and optional AES-256 encryption.
Automatically rotate and clean up Docker container logs to prevent disk exhaustion.
Gracefully restart Kubernetes workloads with selector-based restarts.
Create compressed automated backups of PostgreSQL databases.
Monitor filesystem disk usage with multi-channel alerting.
Clean up stale Kubernetes resources in namespaces (failed pods, old replicasets, etc.).
Batch update and manage multiple git repositories.
Test connectivity to various database systems (MySQL, Postgres, Redis, MongoDB).
Monitor the health status of Docker Compose services with a configurable timeout.
If you have a Bash script that you'd like to add to this collection, feel free to submit a pull request. Contributions are welcome!
Each script includes:
- Detailed comments at the top explaining purpose and requirements
- Usage examples
- Configuration options
- Error handling and logging
- README.md with complete documentation
To use any script:
- Navigate to the script directory
- Read the README.md for specific requirements
- Make the script executable:
chmod +x script.sh - Run the script:
./script.sh