8 my ($cardid,$name)= split /\s+/,$_;
9 $validcards{$cardid}=$name;
15 open($logfile,'>>/var/log/tuer.log');
20 my $card=`/usr/bin/opensc-tool --serial 2>/dev/null`;
21 $card =~ s/[^0-9A-F]//g;
22 $card = substr($card,0,32);
24 if ($validcards{$card})
30 system('cat /var/www/indexopen.html > /var/www/index.html');
31 print $logfile localtime()." ".$validcards{$card}." hat die Tuer geoeffnet\n";
34 system('cat /var/www/indexclosed.html > /var/www/index.html');
35 print $logfile localtime()." ".$validcards{$card} ." hat die Tuer verschlossen\n";
38 print "Card did not match $card\n";