This repository contains useful automation scripts for Linux administrators. These scripts can help automate various administrative tasks such as system updates, backups, monitoring, and maintenance.
- update_and_reboot.sh: Automatically updates all installed packages and reboots the system if required.
- backup_directory.sh: Creates a backup of a specified directory and saves it with a timestamp.
- disk_usage_monitor.sh: Sends an email notification if disk usage exceeds a specified threshold.
- cache_cleanup.sh: Cleans up files older than 7 days in the specified cache directory.
- service_health_check.sh: Checks if specified services are running and restarts them if they are not.
- temp_files_cleanup.sh: Deletes temporary files older than 30 days from the specified directory.
- db_backup.sh: Creates a MySQL database dump.
- db_restore.sh: Restores a MySQL database dump.
- cpu_mem_monitor.sh: Monitors CPU and memory usage and sends an email if usage exceeds specified thresholds.
-
Clone the repository:
git clone https://github.com/fobaty/AdminScripts.git cd AdminScripts -
Make the scripts executable:
chmod +x *.sh -
Run the scripts with root privileges as needed:
sudo ./update_and_reboot.sh
This project is licensed under the MIT License - see the LICENSE file for details.