#!/usr/bin/perl -w =head1 NAME stop.pl - upgrade script to stop running Bricolage servers =head1 VERSION $LastChangedRevision$ =head1 DATE $LastChangedDate: 2004-06-09 05:19:39 +0200 (Wed, 09 Jun 2004) $ =head1 DESCRIPTION This script is called by "make upgrade" to stop running servers. Also cleans out the Bricolage temp space since this has to be done after the servers are stopped. =head1 AUTHOR Sam Tregar =head1 SEE ALSO L =cut use strict; use FindBin; use lib "$FindBin::Bin/lib"; use Bric::Inst qw(:all); use File::Spec::Functions qw(:ALL); use Data::Dumper; our $CONFIG; do "./config.db" or die "Failed to read config.db : $!"; our $UPGRADE; do "./upgrade.db" or die "Failed to read upgrade.db : $!"; print "\n\n==> Stopping Bricolage Servers <==\n\n"; # setup environment to ensure scripts run correctly $ENV{BRICOLAGE_ROOT} = $UPGRADE->{BRICOLAGE_ROOT}; print "Stopping Bricolage Apache...\n"; system(catfile($CONFIG->{BIN_DIR}, "bric_apachectl"), "stop"); print "Clearing temp space in $CONFIG->{TEMP_DIR}/bricolage...\n"; system("rm", "-rf", catdir($CONFIG->{TEMP_DIR}, "bricolage")); print "\n\n==> Finished Stopping Bricolage Servers <==\n\n";