#!/usr/bin/perl
# usage: hapusvhost.pl /etc/httpd/conf.d/vhosts.conf domainname
# sometime you need it to fast remove your VirtualHost

$backup=1;
$s=0;
$http=$ARGV[0];
$domain=$ARGV[1];

open(FILE_HTTPD, $http);
@a=<FILE_HTTPD>;
close(FILE_HTTPD);

#rename $ARGV[0],$ftemp;

if ($backup>0) {
$ftemp=join(”",’>>’,$http,’.hapus’);
open(FILE_HTTPD_HAPUS, $ftemp);
}

open(FILE_HTTPD, join(”",”>”,$http));
foreach $A (@a) {
$_ = $A;
(more…)