Skip to content

Instantly share code, notes, and snippets.

@mikepsinn
Created July 3, 2021 03:38
Show Gist options
  • Save mikepsinn/874e3eacaeaed60a5a3167e76f104bb8 to your computer and use it in GitHub Desktop.
Save mikepsinn/874e3eacaeaed60a5a3167e76f104bb8 to your computer and use it in GitHub Desktop.
die if root
#!/bin/bash
if [[ $EUID -eq 0 ]]; then
echo
echo "================ Error ================="
echo "Do not run this as the root user"
echo "========================================"
echo
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment