From 8ce5bb4f310b677baae9ecd857b408f22aa66631 Mon Sep 17 00:00:00 2001 From: orbiter Date: Fri, 10 Apr 2009 09:45:22 +0000 Subject: [PATCH] added shell scripts that list host addresses git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5793 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- bin/down.sh | 11 +++++++++++ bin/up.sh | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100755 bin/down.sh create mode 100755 bin/up.sh 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 '/
/{ gsub("
","" );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 '/
/{ gsub("
","" );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 '/
/{ gsub("
","" );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 '/
/{ gsub("
","" );gsub("<\/address>","" ); print $0 }' | awk '{print $1}'; +else + exit 1 +fi +