summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-08-02 02:20:47 +0000
committerPeter Palfrader <peter@palfrader.org>2002-08-02 02:20:47 +0000
commit855aacac4b3292aac15a49293985f4c7f7f40049 (patch)
treeeca122175ff54462bb23e40e7950c5d64da8001d
parent4c11656fc82eedff1461695c8c141ef1c964dc50 (diff)
Added pingctl wrapper to toolsecholot-2.0beta20
echolot --help now gives a brief list of commands Added acknowledgements
-rw-r--r--NEWS5
-rw-r--r--README33
-rwxr-xr-xpingd20
-rwxr-xr-xtools/pingctl108
4 files changed, 157 insertions, 9 deletions
diff --git a/NEWS b/NEWS
index ea070f7..00e1bec 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,8 @@
+Changes in version 2.0beta20 - 2002-08-02
+ * Added pingctl wrapper to tools.
+ * echolot --help now gives a brief list of commands.
+ * Added acknowledgements.
+
Changes in version 2.0beta19 - 2002-07-29
* Build keyrings in results.private too
diff --git a/README b/README
index 6ac1e50..9c9e9d3 100644
--- a/README
+++ b/README
@@ -1,4 +1,9 @@
-$Id: README,v 1.22 2002/07/22 02:18:30 weasel Exp $
+$Id: README,v 1.23 2002/08/02 02:20:47 weasel Exp $
+#####################################################################
+## R E A D M E F O R E C H O L O T ###########################
+#####################################################################
+
+| Echolot, das: German, sonic depth finder
Echolot is a Pinger for anonymous remailers.
@@ -11,8 +16,8 @@ Additionally it collects configuration parameters and keys of all
remailers and offers them in a format readable by remailer clients.
-This is echolot2. Besides the name, author and purpose this has nothing
-to do with echolot1. It's written from scratch.
+This is Echolot2. Besides the name, author and purpose this has nothing
+to do with Echolot1. It's written from scratch.
LICENSE
-------
@@ -45,7 +50,7 @@ o Create a new unix user named »pinger« (You can actually use any name
o Make sure you have the perl libraries mentioned above and GnuPG
installed properly.
-o Copy all echolot files and directories to ~pinger/echolot
+o Copy all Echolot files and directories to ~pinger/Echolot
o Copy/Rename the pingd.conf.sample file to pingd.conf.
@@ -66,10 +71,10 @@ o If the GnuPG executable »gpg« is not in your PATH, set
o Set my_localpart and my_domain in pingd.conf to the appropriate values
for your pinger. Mail to my_localpart@my_domain needs to reach
- echolot.
+ Echolot.
o Make sure your MTA supports user defined mailboxes. so that
- my_localpart+anything@my_domain also reaches echolot.
+ my_localpart+anything@my_domain also reaches Echolot.
^^^^^^^^^
If you use another character instead of + to indicate a user defined
extension set recipient_delimiter accordingly in pingd.conf.
@@ -117,6 +122,11 @@ o »./pingd --detach --verbose start«
o You can tail the output file to get the debugging output:
»tail -f output«
+o In the tools directory you find the »pingctl« wrapper for Echolot.
+ It takes care of checking ulimits, userid and cd'ing to the right
+ directory. If you want you can install it as an init script in
+ /etc/init.d or similar and link it from the runlevel directories
+ if your init is SysV style.
CONFIGURATION
@@ -133,7 +143,7 @@ After changing pingd.conf you need to restart pingd.
CAVEATS
-------
-- echolot will keep open all ping and metadata files. This means it needs quite
+- Echolot will keep open all ping and metadata files. This means it needs quite
a few file descriptors (about 2 * total keys or 6 to 8 * remailers + some for
perl). If you have a very strict ulimit for open files you need to increase it.
Something like 512 should be plenty.
@@ -142,3 +152,12 @@ CAVEATS
Please report bugs and feature requests at
http://savannah.gnu.org/bugs/?group=echolot
+
+The Echolot homepage is at
+http://www.palfrader.org/echolot/
+
+ACKNOWLEDGEMENTS
+----------------
+ Orange Admin for contributing ideas and templates
+ The FSF for savanna.gnu.org.
+ All testers of Echolot.
diff --git a/pingd b/pingd
index 6f5a64f..d74c8da 100755
--- a/pingd
+++ b/pingd
@@ -3,7 +3,7 @@
$| = 1;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: pingd,v 1.50 2002/07/29 13:36:20 weasel Exp $
+# $Id: pingd,v 1.51 2002/08/02 02:20:47 weasel Exp $
#
=pod
@@ -251,7 +251,7 @@ use Echolot::Thesaurus;
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
-my $VERSION = '2.0beta19';
+my $VERSION = '2.0beta20';
my $redirected_stdio = 0;
@@ -516,6 +516,22 @@ if ($params->{'help'}) {
print ("See man pingd or perldoc pingd for more info.\n");
print ("echolot $VERSION - (c) 2002 Peter Palfrader <peter\@palfrader.org>\n");
print ("http://savannah.gnu.org/projects/echolot/\n");
+ print ("\n");
+ print ("Commands:\n");
+ print (" start starts echolot pingd\n");
+ print (" signals pingd to ... \n");
+ print (" stop ... shutdown\n");
+ print (" process ... reopen outfile and process commands\n");
+ print (" add ... add a remailer address\n");
+ print (" delete ... delete a remailer address\n");
+ print (" set ... set remailer options\n");
+ print (" setremailercaps ... set remailer capabilities manually\n");
+ print (" deleteremailercaps ... delete remailer capabilities manually\n");
+ print (" getkeyconf ... request remailer-xxx data immediatly\n");
+ print (" buildstats ... build remailer stats immediatly\n");
+ print (" buildkeys ... buid keyrings immediatly\n");
+ print (" buildthesaurus ... build thesaurus immediatly\n");
+ print (" dumpconf dump configuration\n");
exit 0;
};
if ($params->{'version'}) {
diff --git a/tools/pingctl b/tools/pingctl
new file mode 100755
index 0000000..b285d84
--- /dev/null
+++ b/tools/pingctl
@@ -0,0 +1,108 @@
+#!/bin/sh
+#
+# pingcntl: echolot control + wrapper
+# Written by admin@arancio.net, peter@palfrader.org
+
+set -e
+
+################################################################
+# You perhaps want to change those items
+
+BASEDIR=/home/weasel/projects/echolot/devel/echolot
+USER=weasel
+VERBOSE=0
+
+# You probably don't want to mess with stuff below this line
+################################################################
+
+PINGD="./pingd"
+CHECKULIMIT=1
+CHECKUID=1
+
+# Check for evil ulimits
+if [ "$CHECKULIMIT" -gt "0" ];
+ FDs=`ulimit -n`
+ HFDs=`ulimit -H -n`
+ if [ "$FDs" -lt "512" ]; then
+ if [ "$HFDs" -lt "512" ]; then
+ echo "Hardlimit for open File Descriptors is less than 512." >&2
+ echo "Please consider raising it." >&2
+ if [ "$FDs" -lt "$HFDs" ]; then
+ echo "Raising it to $HFDs" >&2
+ ulimit -n $HFDs
+ fi
+ else
+ if [ "$HFDs" -lt "1024" ]; then
+ FDs=$HFDs
+ else
+ FDs=1024
+ fi
+ echo "Softlimit for open File Descriptors is less than 512." >&2
+ echo "Raising it to $FDs" >&2
+ ulimit -n $FDs
+ fi
+ fi
+fi
+
+
+# Check for right User
+SU=""
+if [ "$CHECKUID" -gt "0" ];
+ CUID=`id -u`
+ CUIDNAME=`id -nu`
+ if [ "$CUIDNAME" = "$USER" ]; then
+ SU=""
+ elif [ "$CUID" = "0" ]; then
+ SU="su $USER -c"
+ else
+ echo "You are neither $USER nor root. Aborting." >&2
+ exit 1;
+ fi
+fi
+
+# set VERBOSE
+if [ $VERBOSE -gt 0 ]; then
+ VERBOSE="--verbose"
+else
+ VERBOSE=""
+fi
+
+
+cd $BASEDIR
+
+case $1 in
+
+start)
+ echo -n "Starting Echolot: pingd"
+ $SU $PINGD --detach $VERBOSE start
+ echo "."
+ ;;
+
+stop)
+ echo -n "Stopping Echolot: pingd"
+ $SU $PINGD stop
+ echo "."
+ ;;
+
+reload|force-reload|restart)
+ $0 stop
+ sleep 10
+ $0 start
+ ;;
+process|add|delete|set|setremailercaps|deleteremailercaps|getkeyconf|buildstats|buildkeys|buildthesaurus|dumpconf)
+ echo "Running pingd $1..."
+ $SU $PINGD "$@"
+ echo "done."
+ ;;
+*)
+ echo "Usage: $0 (start|stop|reload|force-reload|restart)" >&2
+ echo " $0 <COMMAND> [parameters]" >&2
+ echo "See the pingd(1) manual page for valid commands" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
+
+# vim:set ts=2:
+# vim:set shiftwidth=2: