You are not logged in.

#1 2012-10-12 17:40:30

walterjwhite
Member
Registered: 2011-05-01
Posts: 207

HAVP - systemd, how to write a systemd service file for HAVP?

Hi guys,

I am trying to write a service file for HAVP and not having much luck.  This is what I have so far.  I can see havp start, but it appears to die immediately.

[Unit]
Description=HAVP
After=network.target

[Service]
ExecStart=/sbin/havp
# --conf-file=/etc/havp/havp.config
PrivateTmp=true
Type=forking
PIDFile=/var/run/havp/havp.pid

[Install]
WantedBy=multi-user.target


Any ideas?

Thanks,

Walter

Offline

#2 2012-11-06 00:09:11

walterjwhite
Member
Registered: 2011-05-01
Posts: 207

Re: HAVP - systemd, how to write a systemd service file for HAVP?

Hi all,

I fixed it, here is the working service file:

[Unit]
Description=HAVP
After=clamd.target

[Service]
Type=forking
PIDFile=/run/havp/havp.pid
ExecStart=/sbin/havp -c /etc/havp/havp.config
LimitNOFILE=infinity

[Install]
WantedBy=multi-user.target

I had to change my havp.config to integrate easily with clamav:

USER clamav
GROUP clamav

PIDFILE /run/havp/havp.pid

USESYSLOG true
SYSLOGNAME havp
SYSLOGFACILITY daemon
SYSLOGLEVEL info
SYSLOGVIRUSLEVEL warning

TRANSPARENT true

PARENTPROXY localhost
PARENTPORT 3128

PORT 8080
BIND_ADDRESS 0.0.0.0

ENABLECLAMD true
CLAMDSOCKET /var/lib/clamav/clamd.sock

Offline

Board footer

Powered by FluxBB