[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] [Raq4r] how to clear ALL users and VSITES and mysl things at ones
- Subject: Re: [cobalt-users] [Raq4r] how to clear ALL users and VSITES and mysl things at ones
- From: "Ken Marcus - Precision Web Hosting" <kenmarcus@xxxxxxxxxxxxxxxx>
- Date: Mon Jun 23 11:05:00 2003
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
> On Mon, 23 Jun 2003, Bob Lenaerts wrote:
> > I want to clear ALL vsites, users, and mysl stuff thats on a raq
> > So I want to keep the configuration, but dan't want to do a clean
> > install.
> > How can I do this quickly ?
First do:
cd ~admin
ls /home/sites/ | grep www. >>
/home/sites/home/users/admin/listofsites.txt
Then run the script below:
#!/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");
}
close (FIL);
exit;
----
Ken Marcus
Precision Web Hosting
mailto:ken@xxxxxxxxxxxxxxxx
http://www.precisionweb.net