File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -2799,7 +2799,7 @@ get_memory() {
2799
2799
pages_wired=" $( vm_stat | awk ' / wired/ { print $4 }' ) "
2800
2800
pages_compressed=" $( vm_stat | awk ' / occupied/ { printf $5 }' ) "
2801
2801
pages_compressed=" ${pages_compressed:- 0} "
2802
- mem_used=" $(( (${ pages_app} + ${pages_wired// .} + ${pages_compressed// .} ) * hw_pagesize / 1024 / 1024 )) "
2802
+ mem_used=" $(( (pages_app + ${pages_wired// .} + ${pages_compressed// .} ) * hw_pagesize / 1024 / 1024 )) "
2803
2803
fi
2804
2804
;;
2805
2805
@@ -4006,12 +4006,12 @@ get_local_ip() {
4006
4006
}
4007
4007
4008
4008
get_public_ip () {
4009
- if [[ ! -n " $public_ip_host " ]] && type -p dig > /dev/null; then
4009
+ if [[ -z " $public_ip_host " ]] && type -p dig > /dev/null; then
4010
4010
public_ip=" $( dig +time=1 +tries=1 +short myip.opendns.com @resolver1.opendns.com) "
4011
4011
[[ " $public_ip " =~ ^\; ]] && unset public_ip
4012
4012
fi
4013
4013
4014
- if [[ ! -n " $public_ip_host " ]] && [[ -z " $public_ip " ]] && type -p drill > /dev/null; then
4014
+ if [[ -z " $public_ip_host " ]] && [[ -z " $public_ip " ]] && type -p drill > /dev/null; then
4015
4015
public_ip=" $( drill myip.opendns.com @resolver1.opendns.com | \
4016
4016
awk ' /^myip\./ && $3 == "IN" {print $5}' ) "
4017
4017
fi
You can’t perform that action at this time.
0 commit comments