made it so it doesn't complain about not having any apps to load
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 25 Jul 2005 00:52:22 +0000 (00:52 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 25 Jul 2005 00:52:22 +0000 (00:52 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@420 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/System.pm

index f932d73..eea252b 100644 (file)
@@ -145,6 +145,11 @@ sub bootstrap {
                my $apps = $client->config_value("activeapps", "appname");
                if(!ref($apps) eq "ARRAY") { $apps = [$apps]; }
 
+               if(@$apps == 0) {
+                       print "No apps to load, exiting...";
+                       return;
+               }
+
                for my $app (@$apps) {
                        # verify we are a settings server and launch 
                        if( $app eq "opensrf.settings" ) {
@@ -161,6 +166,12 @@ sub bootstrap {
        my $client = OpenSRF::Utils::SettingsClient->new();
        my $apps = $client->config_value("activeapps", "appname" );
        if(!ref($apps)) { $apps = [$apps]; }
+
+       if(@$apps == 0) {
+               print "No apps to load, exiting...";
+               return;
+       }
+
        my $server_type = $client->config_value("server_type");
        $server_type ||= "basic";
 
@@ -349,6 +360,8 @@ sub launch_listener {
 
        foreach my $app ( @$apps ) {
 
+               next unless defined($app);
+
                if( $app eq "opensrf.settings" ) { next; }
 
                _log( " * Starting Listener for $app..." );