From b77e9231dedf5db58e9428314a7fe836becc00c9 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 24 Apr 2004 10:34:42 +0000 Subject: Have new disable and enable commands --- pingd | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'pingd') diff --git a/pingd b/pingd index 2d3c45e..8c4dcbf 100755 --- a/pingd +++ b/pingd @@ -26,6 +26,10 @@ pingd - echolot ping daemon =item B B I
[I
...] +=item B B I
[I
...] + +=item B B I
[I
...] + =item B B option=value [option=value..] I
[I
...] =item B B I @@ -96,6 +100,18 @@ keys and confs. Delete I
from the list of remailers to query for keys and confs. Delete all statistics and keys for that remailer. +Note that echolot will add back this remailer if it learns of it from other +remailers again. If you do not want that, use the disable command. + +=item B I
[I
...] + +Shorthand for B B B. This makes echolot +completely ignore that remailer, until you enable it again. + +=item B I
[I
...] + +Shorthand for B B B. + =item B option=value [option=value..] I
[I
...] Possible options and values: @@ -423,6 +439,23 @@ sub command_setremailercaps(@) { }; }; +sub command_enabledisable (@) { + my @argv = @_; + + my $command = shift @argv; + my $value; + if ($command eq 'enable') { + $value='on'; + elsif ($command eq 'disable') { + $value='off'; + else + die ("argument $command is not enable or disable. Shouldn't even be here.\n"); + } + my @cmd = ("showit=$value", "pingit=$value", "fetch=$value"); + push @cmd, @argv; + command_setremailercaps(@argv); +} + sub command_deleteremailercaps(@) { my @argv = @_; @@ -678,6 +711,8 @@ if ($params->{'help'}) { print (" process ... reopen outfile and process commands\n"); print (" add ... add a remailer address\n"); print (" delete ... delete a remailer address\n"); + print (" disable ... disable a remailer\n"); + print (" enable ... enable a remailer\n"); print (" set ... set remailer options\n"); print (" setremailercaps ... set remailer capabilities manually\n"); print (" deleteremailercaps ... delete remailer capabilities manually\n"); @@ -715,6 +750,9 @@ if ($COMMAND eq 'add' || $COMMAND eq 'delete') { } elsif ($COMMAND eq 'set') { command_set(@ARGV); hup_if_wanted($params->{'nohup'}); +} elsif ($COMMAND eq 'enable' || $COMMAND eq 'disable') { + command_enabledisable(@ARGV); + hup_if_wanted($params->{'nohup'}); } elsif ($COMMAND eq 'deleteremailercaps') { command_deleteremailercaps(@ARGV); hup_if_wanted($params->{'nohup'}); -- cgit v1.2.3