Skip to content

Instantly share code, notes, and snippets.

@NanoDano
Created July 20, 2020 03:17
Show Gist options
  • Save NanoDano/6bc9443c627ed64417247ff3310b8b42 to your computer and use it in GitHub Desktop.
Save NanoDano/6bc9443c627ed64417247ff3310b8b42 to your computer and use it in GitHub Desktop.
Require script to be run by root user
#!/usr/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script needs escalated privs. Exiting"
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment