A Bash script that provides emergency options to Mac users in case their system becomes unresponsive or unstable. The script allows the user to choose between force restarting the Dock, Finder, or the whole system. The "Force Reboot" option includes a second warning message in red text, reminding the user that all unsaved changes will be lost.
Before executing any action, the script checks whether the system integrity protection is disabled, and logs all the actions performed in a log file with a timestamp. Additionally, the script includes a warning message that explains the risks associated with using the script, and requires the user to confirm that they understand the risks before proceeding.
How to use:
Download the script to your Mac.
Open a Terminal window.
Navigate to the directory where the script is located.
Type ./emergency-prompt.sh and press Enter.
Follow the on-screen instructions to choose the desired action.