postfix_exporter.service erb-template

This commit is contained in:
Denis Knauf 2022-05-19 14:46:56 +02:00
parent f057ce701f
commit 80b13f9d3c

View file

@ -0,0 +1,18 @@
<% require 'pathname'; path = Pathname.new( __FILE__).expand_path.dirname %>
[Unit]
Description=Postfix and Dovecot performace data exporter
Documentation=https://git.denkn.at/deac/postfix_exporter
After=systemd-journald.service network.target
[Service]
Type=notify
Restart=always
User=postfix_exporter
WorkingDirectory=<%=path%>
ExecStart=<%=`which bundle`.chomp%> exec puma --bind 'tcp://[::]:9124' --environment production --tag postfix_exporter
ExecReload=/bin/kill -USR1 $MAINPID
KillMode=mixed
WatchdogSec=10
[Install]
WantedBy=multi-user.target