.
This commit is contained in:
13
default.inc
Executable file
13
default.inc
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
do_with_root() {
|
||||
if [[ `whoami` = 'root' ]]; then
|
||||
$*
|
||||
elif [[ -x /bin/sudo || -x /usr/bin/sudo ]]; then
|
||||
echo "sudo $*"
|
||||
sudo $*
|
||||
else
|
||||
echo -e "${BOrange}Please run this script as root.${Color_Off}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
Reference in New Issue
Block a user