Skip to content
This repository
tree: f379c74993
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 21 lines (15 sloc) 0.533 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#!/usr/bin/perl

use DBI;
use Config::Tiny;

my $cfg = new Config::Tiny->read('config.ini');

if ($< == 0){
  print "Great, we are root, continuing...\n";
} else {
  print "Please run this script as root!\n";
  exit(0);
}

my $dbh = DBI->connect("DBI:mysql:database=present;host=localhost;port=" . $cfg->{mysql}->{port},$cfg->{mysql}->{username},$cfg->{mysql}->{password}) or die "Unable to connect...\n";
$dbh->do("delete from events");
$dbh->do("delete from active_recording");
$dbh->do("delete from vnc_clients");

print "OK.\n";
Something went wrong with that request. Please try again.