[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [cobalt-developers] Remove site in shell



-----Original Message-----
From: cobalt-developers-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-developers-admin@xxxxxxxxxxxxxxx] On Behalf Of Ken Marcus -
Precision Web Hosting
Sent: Wednesday, November 26, 2003 12:27 PM
To: cobalt-developers@xxxxxxxxxxxxxxx
Subject: Re: [cobalt-developers] Remove site in shell



----- Original Message ----- 
From: "Anders" <andersb@xxxxxxxxxxx>
To: <cobalt-developers@xxxxxxxxxxxxxxx>
Sent: Wednesday, November 26, 2003 9:14 AM
Subject: Re: [cobalt-developers] Remove site in shell


> Chris wrote:
> > Is there a shell command to remove a virtual site & all of it's 
> > users?
>
> You first need Jeff Bilicki's shell tools installed. 
> ftp://ftp-eng.cobalt.com/pub/users/jeffb/shell-tools/
>
> Then try /usr/sbin/cdelvsite --help ?
>
> --anders
>
>
Here is a perl script that uses the shell tools. I have used it to delete
multiple sites off a server. The listofsites.txt is a text file with one
doman per line in the format of www.theirdomain.com

#!/usr/bin/perl
#remove  all the sites on list

print "Try to open listofsites.txt\n";
open (FIL,"listofsites.txt") or die "Can't Open\n";
  while (<FIL>) {
  $thedomain =  $_;
  chomp $thedomain;
  print "Delete the site $thedomain\n";
  #system("/usr/sbin/cdelvsite -d $thedomain");
  system("/usr/sbin/cdelvsite --fqdn $thedomain");

}
close (FIL);

----
Ken Marcus
Precision Web Hosting
ken@xxxxxxxxxxxxxxxx
http://www.precisionweb.net


-----------------------------

That's funny, I just wrote a perl script that's almost identical to that.
Anders's suggested Jeff's shell tools which is working very well so far.
Thanks for your help everyone!

Regards, 

Chris