Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

added shell scripts that list host addresses

orbiter8ce5bb4f310b
diff --git a/bin/down.sh b/bin/down.sh
new file mode 100755
index 000000000..377169851
--- /dev/null
+++ b/bin/down.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+cd "`dirname $0`"
+port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
+if which curl &>/dev/null; then
+ curl -s "http://localhost:$port/Network.xml?page=2&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}'
+elif which wget &>/dev/null; then
+ wget -q -O - "http://localhost:$port/Network.xml?page=2&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}'
+else
+ exit 1
+fi
+
diff --git a/bin/up.sh b/bin/up.sh
new file mode 100755
index 000000000..57ade3959
--- /dev/null
+++ b/bin/up.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+cd "`dirname $0`"
+port=$(grep ^port= ../DATA/SETTINGS/yacy.conf |cut -d= -f2)
+if which curl &>/dev/null; then
+ curl -s "http://localhost:$port/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
+elif which wget &>/dev/null; then
+ wget -q -O - "http://localhost:$port/Network.xml?page=1&ip=" | awk '/<address>/{ gsub("<address>","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}';
+else
+ exit 1
+fi
+