Created
May 19, 2026 08:49
-
-
Save niraj-shah/28be495023dde06d87bbf6ac60839bb8 to your computer and use it in GitHub Desktop.
Securely delete files and remove the cPanel account
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 | |
| # Check if username is provided | |
| if [ -z "$1" ]; then | |
| echo "Usage: $0 <username>" | |
| exit 1 | |
| fi | |
| USERNAME=$1 | |
| find "/home/$USERNAME" -type f -exec shred -uvz {} \; | |
| /usr/local/cpanel/scripts/removeacct --force "$USERNAME" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment