Add a phplist service which processes queue and bounces every 5 minutes

tags/smeserver-phplist-0.2.1-1
Daniel Berteaud 10 years ago
parent 409f363159
commit 2ddb3d23b0
  1. 10
      createlinks
  2. 7
      root/var/service/phplist/log/run
  3. 15
      root/var/service/phplist/run
  4. 4
      smeserver-phplist.spec

@ -10,3 +10,13 @@ safe_symlink("/etc/e-smith/templates-default/template-begin-php", "root/etc/e-sm
safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/etc/phplist/config.php/template-end"); safe_symlink("/etc/e-smith/templates-default/template-end-php", "root/etc/e-smith/templates/etc/phplist/config.php/template-end");
safe_symlink("/var/qmail/alias/.qmail-phplistbounces", "root/var/qmail/alias/.qmail-phplistbounces-default"); safe_symlink("/var/qmail/alias/.qmail-phplistbounces", "root/var/qmail/alias/.qmail-phplistbounces-default");
safe_symlink("../daemontools" , 'root/etc/rc.d/init.d/supervise/phplist');
safe_symlink("/var/service/phplist" , 'root/service/phplist');
safe_touch("root/var/service/phplist/down");
safe_symlink("sigterm", "root/etc/e-smith/events/webapps-update/services2adjust/phplist");
service_link_enhanced('phplist', 'S98', '7');
service_link_enhanced('phplist', 'K12', '6');
service_link_enhanced('phplist', 'K12', '0');

@ -0,0 +1,7 @@
#!/bin/sh
exec \
/usr/local/bin/setuidgid smelog \
/usr/local/bin/multilog t n20 s10000000 \
/var/log/phplist

@ -0,0 +1,15 @@
#!/bin/sh
exec 2>&1
cd /usr/share/phplist/bin
while true; do
exec \
/usr/local/bin/setuidgid www \
/usr/bin/php ./phplist -pprocessbounces \
exec \
/usr/local/bin/setuidgid www \
/usr/bin/php ./phplist -pprocessqueue \
sleep 300
done

@ -55,6 +55,7 @@ running on SME Server
%build %build
perl ./createlinks perl ./createlinks
%{__mkdir_p} %{buildroot}/var/lib/phplist %{__mkdir_p} %{buildroot}/var/lib/phplist
%{__mkdir_p} %{buildroot}/var/log/phplist
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
@ -62,6 +63,9 @@ rm -rf $RPM_BUILD_ROOT
rm -f %{name}-%{version}-filelist rm -f %{name}-%{version}-filelist
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
--dir /var/lib/phplist 'attr(0750,www,www)' \ --dir /var/lib/phplist 'attr(0750,www,www)' \
--dir /var/log/phplist 'attr(0750,smelog,smelog)' \
--file /var/service/phplist/run 'attr(0750,root,root)' \
--file /var/service/phplist/log/run 'attr(0750,root,root)' \
> %{name}-%{version}-filelist > %{name}-%{version}-filelist
%files -f %{name}-%{version}-filelist %files -f %{name}-%{version}-filelist

Loading…
Cancel
Save