From 1226751f1060dc8aeff634ad7aaef19d6cfc66ae Mon Sep 17 00:00:00 2001 From: Daniel STAN Date: Fri, 8 Mar 2013 16:06:17 +0100 Subject: [PATCH] [monit] ajout d'arpwatch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Il faudrait plutôt faire ça avec un service monit duquel dépendent tous les enfants. Comme pour le initscript de mumudvb, c'est mal foutu et il n'y a pas de possibilité de restart un seul process. --- Python/etc/arpwatch.conf | 1 + Python/etc/monit/services | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Python/etc/arpwatch.conf b/Python/etc/arpwatch.conf index 3bc01c4..0181887 100644 --- a/Python/etc/arpwatch.conf +++ b/Python/etc/arpwatch.conf @@ -1,4 +1,5 @@ # -*- coding: utf-8; mode: python -*- +header() info["owner"] = "root" info["group"] = "root" diff --git a/Python/etc/monit/services b/Python/etc/monit/services index aa2dd65..74f40a5 100644 --- a/Python/etc/monit/services +++ b/Python/etc/monit/services @@ -66,7 +66,18 @@ service("backuppc-server", service("isc-dhcp-server", pidf="dhcpd") -# bind's pidfile has changed on squeeze +if has('arpwatch'): + include("arpwatch") + # TODO modeliser ceci par un seul service pour éviter des races débiles + # au moment des restart ... + for vlan in watched_vlans: + iface = 'eth0' + if vlan <> 1: + iface += '.%d' % vlan + service(None, name='arpwatch-%s' % iface, + init='arpwatch', + ) + service("bind", init="bind9", pidf="named/named")