Ignore:
Timestamp:
2016-05-10T16:39:20+12:00 (8 years ago)
Author:
ak19
Message:
  1. get_library_URL() called internal to servercontrol.pm when using servercontrol in activate.pl too. 2. More tidying up: removed lots of variables no longer in use.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/bin/script/activate.pl

    r30523 r30524  
    113113   
    114114    print STDERR "\n";
    115     print STDERR "Usage: $progname [-collectdir c -builddir b -indexdir i -site s -skipactivation -removeold -keepold -verbosity v\n";
     115    print STDERR "Usage: $progname [-collectdir c -builddir b -indexdir i -site s -skipactivation -removeold -keepold -incremental -verbosity v\n";
    116116    print STDERR "\t-library_url URL -library_name n] <[colgroup/]collection>\n";
    117117    print STDERR "\n";
     
    247247   
    248248    # 1. Get library URL
    249    
    250     # For web servers that are external to a Greenstone installation,
    251     # the user can pass in their web server's library URL.
    252     # For web servers included with GS (like tomcat for GS3 and server.exe
    253     # and apache for GS2), we work out the library URL:
    254     if(!$library_url) {
    255     $library_url = $gsserver->get_library_URL(); # returns undef if no server is running
    256     }
    257    
    258     # CollectionManager's installCollection phase in GLI
    259     # 2. Ping the library URL, and if it's a persistent server and running, release the collection   
    260     if($library_url && !$skipactivation) { # undef if no valid server URL   
    261     $gsserver->do_deactivate();
    262     }
     249    # CollectionManager's installCollection phase in GLI:
     250    # 2. Ping the library URL, and if it's a persistent server and running, release the collection   
     251    $gsserver->do_deactivate() unless $skipactivation;   
    263252
    264253    # 2b. If we're working with a solr collection, then start up the solrserver now.
     
    386375
    387376   
    388     # 4. Ping the library URL, and if it's a persistent server and running, activate the collection again   
     377    # 4. Ping the library URL, and if it's a persistent server and running, activate the collection again
    389378   
    390379    # Check for success: if building does not exist OR is empty OR if building is index (in which case there was no move)   
    391380    if($build_dir eq $index_dir || !&FileUtils::directoryExists($build_dir) || &FileUtils::isDirectoryEmpty($build_dir)) {
    392381   
    393     if($library_url && !$skipactivation) { # undef if no valid server URL
    394         $gsserver->do_activate();
    395     }
     382    $gsserver->do_activate() unless $skipactivation;
     383   
    396384    } else { # installcollection failed     
    397385    #CollectionManager.Preview_Ready_Failed
Note: See TracChangeset for help on using the changeset viewer.