Created
July 8, 2017 19:01
-
-
Save zealfire/d1d81149a30905986eeb9f6729f41d05 to your computer and use it in GitHub Desktop.
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
Test if you are root, and if not, restart with sudo, for example: | |
#! /bin/bash | |
if [[ $EUID -ne 0 ]]; | |
then | |
exec sudo /bin/bash "$0" "$@" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment