Index: [Article Count Order] [Thread]

Date:  Wed, 28 Mar 2007 00:20:57 +0100
From:  Jason Humphrey <jasonh (at mark) businessws.com>
Subject:  [coba-e:09330] Re: Deleting all Vsites
To:  coba-e (at mark) bluequartz.org
Message-Id:  <4609A6D9.4020001 (at mark) businessws.com>
In-Reply-To:  <05da01c770c0$a2b8cbc0$6700a8c0@OfficeKen>
References:  <460993C6.9050704 (at mark) businessws.com> <05da01c770c0$a2b8cbc0$6700a8c0 (at mark) OfficeKen>
X-Mail-Count: 09330

Ken Marcus - Precision Web Hosting, Inc. wrote:
>
>> Anyone know a quick way to remove all users and vsites??
>>
>> I guess the answer will use cdelvsite.
>>
>> -- 
>> Kind regards,
>>
>> Jason Humphrey
>>
>> E: jasonh (at mark) businessws.com
>> M: 07786 393418
>> T: 0870 8965598
>>
>
>
> Jason
>
> If you put a list of the sites into a file named: listofsites.txt
> ls -1 /home/sites >> listofsites.txt
>
>
>
> Then make a file like   delistes.pl   with the contents below, and run 
> it.
>
>
> #!/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);
>
> exit;
Absolutly PERFECT!

Did the job in bout 10mins.

-- 
Kind regards,

Jason Humphrey

E: jasonh (at mark) businessws.com
M: 07786 393418
T: 0870 8965598