#! /tools/bin/perl

require '/usr/www/push/common20.pl';
require '/usr/www/push/php/scripts/auth.pl';

my $www_machine=shift;
my $webdir="/usr/local/webdev";
my $sourcedir="/usr/www/push/temp/src/apache_1.3.12/conf/epinions.conf";
##################################################
my $ssh="/tools/bin/ssh";

&auth();
&stop_start_webdev(stop);
sleep 10;
&stop_start_webdev(start);

sub stop_start_webdev
{
my $command=shift;
if ($command eq "stop"){
	$cmd="$ssh root\@$www_machine \" cd $webdir; ./stop \" ";
	print "$cmd\n";
	&ssh_pipe($cmd);
} elsif ($command eq "start") {
	$cmd="$ssh root\@$www_machine \"cd $webdir; ./start \" ";
	print "$cmd\n";
	&ssh_pipe($cmd);
} # End of if
} # End of stop_start_webdev
