mirror of
https://github.com/NeoCloud/NeoNetwork
synced 2024-11-22 17:20:40 +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/,/\/}"
|
||||
source "$i"
|
||||
case "$TYPE" in
|
||||
TUN30) print_tun30 "$subnet" "$PROTO" "$UPSTREAM" "$DOWNSTREAM";;
|
||||
SUBNET) print_subnet "$subnet" "$NAME" "$DESC";;
|
||||
LO) print_lo "$subnet" "$NAME" "$DESC";;
|
||||
*) errmsg "Invalid \$TYPE in $i\n";;
|
||||
|
@ -131,7 +130,21 @@ route)
|
|||
done
|
||||
;;
|
||||
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";;
|
||||
esac
|
||||
|
||||
|
|
Loading…
Reference in a new issue