#! /usr/bin/perl
use DBI;
use File::Path;
+use YAML;
+$conf = YAML::LoadFile("/etc/squarantine/squarantine.conf");
+
open(FILE,">>/tmp/usbunplug") or die;
print FILE "--------------", "\n";
foreach my $key( keys %ENV ){
system("umount ".$ENV{'DEVNAME'});
##MOUNTPOINT DELETE##
-my $dbh = DBI->connect("DBI:mysql:squarantine", "root", "Cab6402!") || die "CONNECT ERROR $DBI::ERRSTR";
+$dbh = DBI->connect("DBI:mysql:$conf->{MYSQL_DB}", "$conf->{MYSQL_USER}", "$conf->{MYSQL_PASS}") || die "CONNECT ERROR $DBI::ERRSTR";
my $sth = $dbh->prepare("select nickname,memo,flags from media where id_serial=\'".$ENV{'ID_SERIAL'}."\'");
$sth->execute;