commit
112e0d0a2b
7 changed files with 144 additions and 0 deletions
@ -0,0 +1,12 @@ |
||||
#!/usr/bin/perl -w |
||||
|
||||
use esmith::Build::CreateLinks qw(:all); |
||||
|
||||
safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/mailman'); |
||||
safe_symlink("/var/service/mailman" , 'root/service/mailman'); |
||||
safe_touch("root/var/service/mailman/down"); |
||||
|
||||
foreach my $event (qw/webapps-update ipasserelle-update bootstrap-ldap-save/){ |
||||
event_link("ipasserelle-mailman-init-domain", "$event", "55"); |
||||
} |
||||
|
@ -0,0 +1,56 @@ |
||||
%define version 0.2.0 |
||||
%define release 1 |
||||
%define name ipasserelle-listes |
||||
|
||||
Name: %{name} |
||||
Version: %{version} |
||||
Release: %{release}%{?dist} |
||||
Summary: iPasserelle mailing list module |
||||
Group: System Environment/Applications |
||||
License: GPLv3+ |
||||
URL: http://www.ipasserelle.com |
||||
Source0: %{name}-%{version}.tar.gz |
||||
|
||||
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot |
||||
|
||||
BuildRequires: e-smith-devtools |
||||
|
||||
Requires: ipasserelle-base |
||||
Requires: smeserver-mailman |
||||
|
||||
%description |
||||
iPasserelle module for the mailing list service |
||||
Uses smeserver-mailman |
||||
|
||||
%changelog |
||||
* Mon Jun 18 2012 Daniel Berteaud <daniel@firewall-services.com> - 0.2.0 |
||||
- Import in GIT |
||||
|
||||
* Thu Sep 12 2011 Daniel Berteaud <daniel@firewall-services.com> - 0.1-1.sme |
||||
- Initial release |
||||
|
||||
%prep |
||||
%setup -q |
||||
|
||||
%build |
||||
perl ./createlinks |
||||
|
||||
%install |
||||
rm -rf $RPM_BUILD_ROOT |
||||
rm -f %{name}-%{version}-filelist |
||||
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT) |
||||
/sbin/e-smith/genfilelist \ |
||||
--file /var/service/mailman/qrunner 'attr(0755,root,root)' \ |
||||
--file /var/service/mailman/run 'attr(0755,root,root)' \ |
||||
$RPM_BUILD_ROOT > %{name}-%{version}-%{release}-filelist |
||||
|
||||
%files -f %{name}-%{version}-%{release}-filelist |
||||
|
||||
%clean |
||||
rm -rf $RPM_BUILD_ROOT |
||||
|
||||
%post |
||||
|
||||
%postun |
||||
|
||||
|
@ -0,0 +1,47 @@ |
||||
#!/usr/bin/perl -w |
||||
#---------------------------------------------------------------------- |
||||
# copyright (C) 2010-2011 Firewall-Services |
||||
# daniel@firewall-services.com |
||||
# |
||||
# This program is free software; you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation; either version 2 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program; if not, write to the Free Software |
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||||
# |
||||
#---------------------------------------------------------------------- |
||||
|
||||
use strict; |
||||
use warnings; |
||||
use esmith::DomainsDB; |
||||
use esmith::ConfigDB; |
||||
|
||||
my $d = esmith::DomainsDB->open or die "Couldn't open DomainsDB\n"; |
||||
my $c = esmith::ConfigDB->open_ro() or die "Couldn't open ConfigDB\n"; |
||||
|
||||
my $domain = $c->get('DomainName')->value; |
||||
my $vhost; |
||||
|
||||
$vhost = $d->get("listes.$domain"); |
||||
|
||||
if (!$vhost){ |
||||
$d->new_record("listes.$domain",{ |
||||
type => 'domain', |
||||
Content => 'Primary', |
||||
Description => "Mailinglist", |
||||
Nameservers => 'internet', |
||||
}); |
||||
|
||||
unless ( system("/sbin/e-smith/signal-event", "domain-create", "listes.$domain") == 0 ){ |
||||
die "Failed to create domain listes.$domain\n"; |
||||
} |
||||
} |
||||
|
@ -0,0 +1 @@ |
||||
DEFAULT_SERVER_LANGUAGE = '{$mailman{'Language'} || 'fr'}' |
@ -0,0 +1,18 @@ |
||||
{ |
||||
|
||||
$conf->{'applicationList'}->{'010apps'}->{'mailman'} = { |
||||
'options' => { |
||||
'logo' => 'mailappt.png', |
||||
'name' => 'Mailman', |
||||
'description' => 'Liste de diffusion', |
||||
'uri' => "http://listes.$domain/mailman", |
||||
'display' => 'on' |
||||
}, |
||||
'type' => 'application' |
||||
} unless ($conf->{'applicationList'}->{'010apps'}->{'mailman'}); |
||||
|
||||
|
||||
$OUT = ''; |
||||
|
||||
} |
||||
|
@ -0,0 +1,7 @@ |
||||
#!/bin/sh |
||||
|
||||
while `/bin/true`; do |
||||
/usr/lib/mailman/bin/qrunner --runner=All --once |
||||
sleep 10 |
||||
done |
||||
|
@ -0,0 +1,3 @@ |
||||
#!/bin/sh |
||||
exec setuidgid mailman ./qrunner |
||||
|
Loading…
Reference in new issue