- Timestamp:
- 2012-05-14T15:54:36+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/bin/script/activate.pl
r25581 r25596 539 539 # the server is persistent and the collection is active 540 540 &print_msg("Checking if Greenstone server is persistent\n"); 541 $is_persistent_server = &is_persistent($library_url, $gs_mode); 542 543 &print_msg("Checking if the collection $qualified_collection is already active\n"); 544 my $collection_active = &ping_library_collection($library_url, $gs_mode, $qualified_collection, $site); 545 546 if($is_persistent_server && $collection_active) { 541 $is_persistent_server = &is_persistent($library_url, $gs_mode); 542 543 if($is_persistent_server) { # only makes sense to issue activate and deactivate cmds to a persistent server 544 545 &print_msg("Checking if the collection $qualified_collection is already active\n"); 546 my $collection_active = &ping_library_collection($library_url, $gs_mode, $qualified_collection, $site); 547 548 if($collection_active) { 547 549 &print_msg("De-activating collection $qualified_collection\n"); 548 550 &deactivate_collection($library_url, $gs_mode, $qualified_collection, $site); 551 } 549 552 } 550 553 } … … 608 611 } 609 612 610 &print_msg("Checking if the collection $qualified_collection is not already active\n");611 my $collection_active = &ping_library_collection($library_url, $gs_mode, $qualified_collection, $site);612 613 613 if($is_persistent_server && !$collection_active) { 614 if($is_persistent_server) { # persistent server, so can try activating collection 615 616 &print_msg("Checking if the collection $qualified_collection is not already active\n"); 617 my $collection_active = &ping_library_collection($library_url, $gs_mode, $qualified_collection, $site); 618 619 if(!$collection_active) { 614 620 &print_msg("Activating collection $qualified_collection\n"); 615 621 &activate_collection($library_url, $gs_mode, $qualified_collection, $site); 622 } 616 623 } 617 624 }
Note:
See TracChangeset
for help on using the changeset viewer.