Refactor my refactoring :)
This commit is contained in:
parent
424b69cd60
commit
d3cabadd8f
1 changed files with 4 additions and 8 deletions
|
|
@ -7,18 +7,14 @@
|
|||
############ FUNCTIONS ############
|
||||
#########################################
|
||||
|
||||
function tunAvailable () {
|
||||
if [[ -e /dev/net/tun ]]; then
|
||||
return 0
|
||||
else
|
||||
function isRoot () {
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
function isRoot () {
|
||||
if [[ "$EUID" -eq 0 ]]; then
|
||||
return 0
|
||||
else
|
||||
function tunAvailable () {
|
||||
if [ ! -e /dev/net/tun ]; then
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue