mirror of
https://github.com/bigbeartechworld/big-bear-scripts.git
synced 2026-03-31 06:24:02 -04:00
This commit refactors all the shell scripts to use `#!/usr/bin/env bash` instead of `#!/bin/bash`. This change ensures that the scripts will run with the system's default Bash interpreter, even if it is not located at the standard `/bin/bash` path.
Why?
This is a handy script to monitor disk usage and send an email or Discord message if the usage exceeds a certain threshold (80% by default).
Parmeters
The script accepts the following parameters:
--email=<email address>: The email address to send the message to. If not provided, the script will prompt the user to enter the email address.--discord=<webhook URL>: The Discord webhook URL to send the message to. If not provided, the script will prompt the user to enter the webhook URL.--threshold=<percentage>: The percentage threshold for disk usage. The default value is 80.
How to use?
bash -c "$(wget -qLO - https://raw.githubusercontent.com/bigbeartechworld/big-bear-scripts/master/disk-usage-monitor/run.sh)"