Last active
August 1, 2018 18:27
-
-
Save jstncno/0b18aff5a5cbe98edfe72931880e0f94 to your computer and use it in GitHub Desktop.
Bash script that must run with sudo
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 | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root (use sudo)" 1>&2 | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment