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