summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-07-10 12:42:56 +0000
committerPeter Palfrader <peter@palfrader.org>2002-07-10 12:42:56 +0000
commit4a10af5d62d93aa14a279d89d75a1dfb7c159879 (patch)
tree5c22781967385de45078a0e3227e0e52169f84d3
parent14f5e4cb38eef94d8803d28e24dd442f64d68d4a (diff)
Added --process switch
-rwxr-xr-xpingd14
1 files changed, 12 insertions, 2 deletions
diff --git a/pingd b/pingd
index 508eb67..05bb6aa 100755
--- a/pingd
+++ b/pingd
@@ -1,7 +1,7 @@
#!/usr/bin/perl -wT
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: pingd,v 1.23 2002/07/10 12:27:51 weasel Exp $
+# $Id: pingd,v 1.24 2002/07/10 12:42:56 weasel Exp $
#
=pod
@@ -146,7 +146,7 @@ Print version number and exit sucessfully.
=item --nohup
-Usefull only when passwd with the B<add>, B<set>, B<setremailercaps>,
+Usefull only when passed with the B<add>, B<set>, B<setremailercaps>,
B<deleteremailercaps> or B<getkeyconf> command.
Don't send a HUP signal to the daemon which instructs it to process the
@@ -154,6 +154,12 @@ commands after adding the command to the task list.
Per default such a signal is sent.
+=item --process
+
+Usefull only when passed with the B<start> command.
+
+Read and process the commands file on startup.
+
=item --detach
Usefull only when passwd with the B<start> command.
@@ -367,6 +373,9 @@ sub daemon_run() {
$scheduler->add('getkeyconf' , Echolot::Config::get()->{'getkeyconf'} , 0, \&Echolot::Conf::send_requests );
$scheduler->add('check_resurrection' , Echolot::Config::get()->{'check_resurrection'} , 0, \&Echolot::Conf::check_resurrection );
+ Echolot::Globals::get()->{'scheduler'}->schedule('readcommands', time() )
+ if ($params->{'process'});
+
$scheduler->run();
Echolot::Globals::get()->{'storage'}->commit();
@@ -451,6 +460,7 @@ if (!GetOptions (
'verbose' => \$params->{'verbose'},
'nohup' => \$params->{'nohup'},
'detach' => \$params->{'detach'},
+ 'process' => \$params->{'process'},
)) {
die ("$PROGRAM_NAME: Usage: $PROGRAM_NAME [-fwhv]\n");
};