[Pkg-systemd-maintainers] systemd support for amavisd-new
Michael Stapelberg
stapelberg at debian.org
Sat Feb 8 09:55:04 GMT 2014
Hi Zbigniew,
Zbigniew Jędrzejewski-Szmek <zbyszek at in.waw.pl> writes:
> On Sat, Feb 08, 2014 at 01:17:13AM +0100, Christian Dröge wrote:
>> diff -Nru amavisd-new-2.8.0/debian/amavisd-new.amavis.service amavisd-new-2.8.0/debian/amavisd-new.amavis.service
>> --- amavisd-new-2.8.0/debian/amavisd-new.amavis.service 1970-01-01 01:00:00.000000000 +0100
>> +++ amavisd-new-2.8.0/debian/amavisd-new.amavis.service 2014-02-08 00:46:33.000000000 +0100
>> @@ -0,0 +1,13 @@
>> +[Unit]
>> +Description=Interface between MTA and virus scanner/content filters
>> +After=network.target
>> +
>> +[Service]
>> +PIDFile=/run/amavis/amavisd.pid
>> +ExecStart=/usr/sbin/amavisd-new foreground
>> +ExecReload=/usr/sbin/amavisd-new reload
>> +ExecStopPost=-/usr/bin/find /var/lib/amavis -maxdepth 1 -name 'amavis-*' -type d -exec rm -rf "{}" \;
> You can just day -delete instead of invoking rm.
Personally, I am unsure whether ExecStopPost is the best directive to
use here. What happens when the service gets killed? Will ExecStopPost
be triggered in that case?
If the intention is to get rid of these files before starting the daemon
(because they somehow make it not work correctly), wouldn’t ExecStartPre
be the better choice? :)
--
Best regards,
Michael
More information about the Pkg-systemd-maintainers
mailing list