This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # ============================================================================== | |
| # Ubuntu APT Maintenance Script | |
| # ============================================================================== | |
| # | |
| # Purpose | |
| # ------- | |
| # Performs scheduled operating system maintenance for Ubuntu servers. | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ============================================================ | |
| # DNF Maintenance Script | |
| # | |
| # Compatibility: | |
| # - Fedora and RHEL-based systems | |
| # - Desktop and headless/server installations | |
| # | |
| # Purpose: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ============================================================ | |
| # APT Maintenance Script | |
| # | |
| # Compatibility: | |
| # - Debian and Ubuntu based systems | |
| # - Desktop and headless/server installations | |
| # | |
| # Purpose: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| THRESHOLD=80 | |
| USAGE=$(df / | awk 'NR==2 {print $5}' | sed 's/%//') | |
| if [ "$USAGE" -gt "$THRESHOLD" ]; then | |
| echo "Warning: Disk usage is ${USAGE}%" | |
| fi |