Skip to content

jawaracloud/bash-collections

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bash Collections

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.

📁 Scripts by Category

System Monitoring & Security

  • 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

Cloud & DevOps

  • 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

Docker & Containers

  • 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

Networking

  • 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

File & Data Management

  • 01-rename-file-with-same-patern/ - Rename files with pattern matching

🆕 New Scripts

12-aws-s3-backup/

Backup directories and files to AWS S3 with compression and optional AES-256 encryption.

13-docker-logs-rotate/

Automatically rotate and clean up Docker container logs to prevent disk exhaustion.

14-k8s-pod-restart/

Gracefully restart Kubernetes workloads with selector-based restarts.

15-postgres-backup/

Create compressed automated backups of PostgreSQL databases.

18-disk-space-alert/

Monitor filesystem disk usage with multi-channel alerting.

22-k8s-namespace-cleaner/

Clean up stale Kubernetes resources in namespaces (failed pods, old replicasets, etc.).

23-git-repo-syncer/

Batch update and manage multiple git repositories.

24-database-connection-tester/

Test connectivity to various database systems (MySQL, Postgres, Redis, MongoDB).

25-docker-compose-healthcheck/

Monitor the health status of Docker Compose services with a configurable timeout.

Contribution

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!

📝 Usage Guidelines

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:

  1. Navigate to the script directory
  2. Read the README.md for specific requirements
  3. Make the script executable: chmod +x script.sh
  4. Run the script: ./script.sh

About

This repository contains a collection of Bash scripts for various purposes. Feel free to explore and use these scripts as needed.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages