Create the listreports pseudo

tags/smeserver-phplist-0.2.1-1
Daniel Berteaud 11 years ago
parent 5bb290796b
commit 4d2fab21e0
  1. 4
      createlinks
  2. 20
      root/etc/e-smith/events/actions/phplist-create-pseudo

@ -6,6 +6,10 @@ templates2events("/etc/e-smith/sql/init/phplistdb", qw/webapps-update bootstrap-
templates2events("/etc/phplist/config.php", qw/webapps-update bootstrap-console-save/);
safe_symlink("/var/qmail/bin/qmail-newu", "root/etc/e-smith/events/webapps-update/S55phplist-qmail-assign");
foreach my $event (qw/webapps-update ipasserelle-update bootstrap-ldap-save/){
event_link("phplist-create-pseudo", "$event", "55");
}
safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-smith/templates/etc/phplist/config.php/template-begin");
safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/etc/phplist/config.php/template-end");

@ -0,0 +1,20 @@
#!/usr/bin/perl -w
use strict;
use warnings;
use esmith::AccountsDB;
my $a = esmith::AccountsDB->open or die "Couldn't open AccountsDB\n";
my $peudo = $a->get('listreports');
if (!$pseudo){
$a->new_record('listreports',{
type => 'pseudonym',
Account => 'admin'
});
unless ( system("/sbin/e-smith/signal-event", "pseudonym-createe", "listreports") == 0 ){
die "Failed to create pseudonym listreports\n";
}
}
Loading…
Cancel
Save