mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-11-22 18:00:41 +08:00
pretty-output: node-dir support
This commit is contained in:
parent
969e6ae2cb
commit
0f69b43874
1 changed files with 15 additions and 2 deletions
|
@ -123,7 +123,6 @@ route)
|
||||||
subnet="${subnet/,/\/}"
|
subnet="${subnet/,/\/}"
|
||||||
source "$i"
|
source "$i"
|
||||||
case "$TYPE" in
|
case "$TYPE" in
|
||||||
TUN30) print_tun30 "$subnet" "$PROTO" "$UPSTREAM" "$DOWNSTREAM";;
|
|
||||||
SUBNET) print_subnet "$subnet" "$NAME" "$DESC";;
|
SUBNET) print_subnet "$subnet" "$NAME" "$DESC";;
|
||||||
LO) print_lo "$subnet" "$NAME" "$DESC";;
|
LO) print_lo "$subnet" "$NAME" "$DESC";;
|
||||||
*) errmsg "Invalid \$TYPE in $i\n";;
|
*) errmsg "Invalid \$TYPE in $i\n";;
|
||||||
|
@ -131,7 +130,21 @@ route)
|
||||||
done
|
done
|
||||||
;;
|
;;
|
||||||
people);;
|
people);;
|
||||||
node);;
|
node)
|
||||||
|
for i in node/*; do
|
||||||
|
node="${i#node/}"
|
||||||
|
source "$i"
|
||||||
|
|
||||||
|
echo -e \
|
||||||
|
"${BRIGHT}${BBLUE}${FYELLOW}========================================${RESET}"
|
||||||
|
|
||||||
|
printf "${BRIGHT}${FYELLOW}%12s${RESET} | ${BRIGHT}${FGREEN}%20s${RESET} | ${FCYAN}%s${RESET}\n" "AS${ASN}" "$node" "$DESC"
|
||||||
|
|
||||||
|
for ip in "${IP[@]}"; do
|
||||||
|
printf "\t%s\n" "$ip"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
;;
|
||||||
*) errmsg "Invalid type\n";;
|
*) errmsg "Invalid type\n";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue