5 my $fname = shift; # Config file to read
6 my $retval = {}; # Return value: ref-to-hash holding the configuration
7 open (CONF, $fname) or return undef;
9 my $var; # Variable name
10 my $value; # Variable value
12 s/#.*//; # Strip comments
13 next if /^\s*$/; # Ignore blank lines
14 next if (!/^\s*(\w+)\s*=\s*(.*?)\s*$/);
17 $retval->{$var} = $value;
23 my $config = ReadConfigFile("/etc/koha.conf");
24 # to remove web sites:
25 print "\nrm -rf ".$config->{intranetdir};
26 print "\nrm -rf ".$config->{opacdir};
29 print "\nmysqladmin -f -u".$config->{user}." -p".$config->{pass}." drop ".$config->{database};
31 print "enter mySQL root password, please\n";
34 print "\nmysql -uroot -p$response -Dmysql -e\"delete from user where user='".$config->{user}.'"';
36 print "\nmysqladmin -uroot -p$response reload";
37 print "\nrm -f /etc/koha-httpd.conf";
38 print "\nrm -f /etc/koha.conf";
39 print "\nEDIT httpd.conf to remove /etc/koha-httpd.conf\n";