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 ############
|
############ FUNCTIONS ############
|
||||||
#########################################
|
#########################################
|
||||||
|
|
||||||
function tunAvailable () {
|
function isRoot () {
|
||||||
if [[ -e /dev/net/tun ]]; then
|
if [ "$EUID" -ne 0 ]; then
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function isRoot () {
|
function tunAvailable () {
|
||||||
if [[ "$EUID" -eq 0 ]]; then
|
if [ ! -e /dev/net/tun ]; then
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue