mirror of
https://github.com/cwinfo/hyperboria-nodedb
synced 2024-11-26 12:51:36 +00:00
Merge pull request #22 from magik6k/addnode
Made simple script to make people add nodes correctly
This commit is contained in:
commit
0784c379bd
17
addnode.sh
Executable file
17
addnode.sh
Executable 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
|
Loading…
Reference in New Issue
Block a user