From: John Graham-C. <jgr...@us...> - 2005-11-21 10:26:59
|
Update of /cvsroot/popfile/engine/POPFile In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9556/POPFile Modified Files: Loader.pm Log Message: Add --shutdown option which means that POPFile will start up, do a single pass through all running modules' service routines and then do a normal shutdown. Added so that the installer can run POPFile once and then terminate automatically Index: Loader.pm =================================================================== RCS file: /cvsroot/popfile/engine/POPFile/Loader.pm,v retrieving revision 1.34 retrieving revision 1.35 diff -C2 -d -r1.34 -r1.35 *** Loader.pm 18 Feb 2005 12:16:44 -0000 1.34 --- Loader.pm 21 Nov 2005 10:26:51 -0000 1.35 *************** *** 90,93 **** --- 90,99 ---- $self->{debug__} = 0; + # If this is set to 1 then POPFile will shutdown straight after it + # has started up. This is used by the installer and set by the + # --shutdown command-line option + + $self->{shutdown__} = 0; + # This stuff lets us do some things in a way that tolerates some # window-isms *************** *** 168,171 **** --- 174,178 ---- GetOptions( "verbose!" => \$self->{debug__}, + "shutdown" => \$self->{shutdown__}, "quiet" => sub{ $self->{debug__} = 0 } ); } *************** *** 738,741 **** --- 745,755 ---- last if $nowait; + + # If we are asked to shutdown then we allow a single run + # through the service routines and then exit + + if ( $self->{shutdown__} == 1 ) { + $self->{alive__} = 0; + } } |