]> git.proxmox.com Git - pmg-api.git/blame - tests/create_testdb.pl
pmg-smtp-filter.service: set Restart=on-abort
[pmg-api.git] / tests / create_testdb.pl
CommitLineData
891e1a24
DM
1#!/usr/bin/perl
2
3use strict;
4use warnings;
5use DBI;
7f0a6c36 6use lib '..';
891e1a24
DM
7
8use PVE::SafeSyslog;
9
10use PMG::DBTools;
11use PMG::RuleDB;
12
13initlog ($0, 'mail');
14
15my $list = PMG::DBTools::database_list();
16
17my $dbname = "Proxmox_testdb";
18
19if ($list->{$dbname}) {
20
21 print "delete existing test database\n";
22 PMG::DBTools::delete_ruledb($dbname);
23}
24
25my $dbh = PMG::DBTools::create_ruledb($dbname);
26my $ruledb = PMG::RuleDB->new($dbh);
27
28$ruledb->close();
29
30exit (0);