Index: [Article Count Order] [Thread]

Date:  Wed, 28 Mar 2007 10:00:42 +0200
From:  Jes Kasper Klittum <jes (at mark) enavn.com>
Subject:  [coba-e:09340] Re: Deleting all Vsites
To:  coba-e (at mark) bluequartz.org
Message-Id:  <460A20AA.30108 (at mark) enavn.com>
In-Reply-To:  <05da01c770c0$a2b8cbc0$6700a8c0@OfficeKen>
References:  <460993C6.9050704 (at mark) businessws.com> <05da01c770c0$a2b8cbc0$6700a8c0 (at mark) OfficeKen>
X-Mail-Count: 09340

Or, a bit easier, i guess;

for a in `ls /home/sites/`; do cdelvsite --fqdn=$a ; done

Jes

Ken Marcus - Precision Web Hosting, Inc. skrev:
> 
> ----- Original Message ----- From: "Jason Humphrey" <jasonh (at mark) businessws.com>
> To: <coba-e (at mark) bluequartz.org>
> Sent: Tuesday, March 27, 2007 2:59 PM
> Subject: [coba-e:09328] Deleting all Vsites
> 
> 
>> 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;
> 


	

9340_2.x-vcard (attatchment)(tag is disabled)