evolinux-base: override logmail service
This commit is contained in:
parent
1a0ba00679
commit
64a134355b
14
evolinux-base/files/log2mail.service
Normal file
14
evolinux-base/files/log2mail.service
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[Unit]
|
||||||
|
Description=Daemon watching logfiles and mailing lines matching patterns
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=forking
|
||||||
|
ExecStart=/usr/sbin/log2mail -- -f /etc/log2mail/config
|
||||||
|
KillMode=control-group
|
||||||
|
Restart=always
|
||||||
|
User=log2mail
|
||||||
|
Group=adm
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
18
evolinux-base/tasks/log2mail.yml
Normal file
18
evolinux-base/tasks/log2mail.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
- name: Deploy log2mail systemd unit
|
||||||
|
copy:
|
||||||
|
src: log2mail.service
|
||||||
|
dest: /etc/systemd/system/log2mail.service
|
||||||
|
mode: "0644"
|
||||||
|
|
||||||
|
- name: Remove log2mail sysvinit service
|
||||||
|
file:
|
||||||
|
path: /etc/init.d/log2mail
|
||||||
|
state: absent
|
||||||
|
|
||||||
|
- name: Enable and start log2mail service
|
||||||
|
systemd:
|
||||||
|
name: log2mail
|
||||||
|
daemon-reload: yes
|
||||||
|
state: restarted
|
||||||
|
enabled: yes
|
|
@ -54,3 +54,7 @@
|
||||||
- name: Customize for Orange FCE
|
- name: Customize for Orange FCE
|
||||||
include: provider_orange_fce.yml
|
include: provider_orange_fce.yml
|
||||||
when: evolinux_provider_orange_fce_include
|
when: evolinux_provider_orange_fce_include
|
||||||
|
|
||||||
|
- name: Override Logmail service
|
||||||
|
include: log2mail.yml
|
||||||
|
when: evolinux_packages_serveur_base
|
||||||
|
|
Loading…
Reference in a new issue