A collection of useful Bash scripts for various tasks, including server management, backups, and automation.
- Description: Automates the process of enabling a new Apache site configuration.
- Usage:
./enable_apache_site.sh <new_file_name.conf> <new_port>
- Description: Installs WordPress in a specified directory with proper permissions.
- Usage:
./install_wordpress.sh <custom_folder_name>
- Description: Creates a PostgreSQL database backup and uploads it to Google Drive.
- Usage: Configure
.envwith required credentials and run the script.
- Description: Sends a test message to a Discord channel using a webhook.
- Usage: Configure
.envwithDISCORD_WEBHOOK_URLand run the script.
- Description: Monitors a server's status (up/down) and sends a Discord notification if the status changes.
- Usage: Edit the script to set
HOST,PORT, andDISCORD_WEBHOOK_URL, then run it periodically (e.g., via cron).
- Description: Checks if a PostgreSQL database is reachable and sends a Discord alert if its status changes.
- Usage: Edit the script to set
DB_HOST,DB_PORT, andDISCORD_WEBHOOK_URL, then run it periodically.
- Description: Removes a range of allowed TCP ports from UFW (Uncomplicated Firewall).
- Usage:
./ufw_ports_remove.sh
- Ensure you have the necessary permissions to execute the scripts.
- Install required dependencies such as
curl,jq,docker,unzip, andnetcat(nc).
- Clone the repository.
- Make the scripts executable:
chmod +x *.sh