diff --git a/createlinks b/createlinks index b3b16c7..b8c5fe1 100644 --- a/createlinks +++ b/createlinks @@ -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"); diff --git a/root/etc/e-smith/events/actions/phplist-create-pseudo b/root/etc/e-smith/events/actions/phplist-create-pseudo new file mode 100644 index 0000000..7fb10a1 --- /dev/null +++ b/root/etc/e-smith/events/actions/phplist-create-pseudo @@ -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"; + } +} +