5
0
mirror of https://github.com/cwinfo/hyperboria-nodedb synced 2024-12-03 17:41:37 +00:00

Made simple script to add nodes correctly

Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
This commit is contained in:
Łukasz Magiera 2015-09-18 20:09:38 +02:00
parent 45abb24942
commit a90a401a41
No known key found for this signature in database
GPG Key ID: DAF1D53BBD4D4790

17
addnode.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
NODEFILE=nodes
if [ "$#" -ne 2 ]; then
echo -e "Usage:\n\t./addnode.sh IPv6 name [name] ..."
exit 1
fi
if grep --quiet $1 $NODEFILE; then
echo "Node IP is already on the list, please edit manually"
exit 1
fi
echo "$@" >> $NODEFILE
sort $NODEFILE -o $NODEFILE