Skip to content
Permalink
Browse files

Avoid arpwatch starting multiple times. Issue #8620

The <starts_on_sync/> service definition change is the real winner, but
requires a recent snapshot to function.
  • Loading branch information...
jim-p committed Aug 29, 2018
1 parent c2ef2d5 commit aa78e490fe92d5640a742bbe77012a5ba626b084
@@ -1,7 +1,7 @@
# $FreeBSD$

PORTNAME= pfSense-pkg-arpwatch
PORTVERSION= 0.1.0
PORTVERSION= 0.1.1
CATEGORIES= net-mgmt
MASTER_SITES= # empty
DISTFILES= # empty
@@ -48,7 +48,8 @@ function arpwatch_install_command() {
$rc = array();
$rc['file'] = 'arpwatch.sh';
$rc['start'] = '';
// Give it a few seconds to stop gracefully, then kill it with fire.
$rc['start'] = "/usr/bin/killall -q arpwatch ; sleep 3; /usr/bin/killall -q -9 arpwatch\n";
$active_interfaces_array = explode(',', $active_interfaces);
@@ -63,12 +64,14 @@ function arpwatch_install_command() {
}
}
$rc['stop'] = '/usr/bin/killall arpwatch || exit 0';
$rc['stop'] = '/usr/bin/killall -q arpwatch';
write_rcfile($rc);
if ($arpwatch_config['enable']) {
restart_service("arpwatch");
if (!platform_booting()) {
restart_service("arpwatch");
}
} else {
stop_service("arpwatch");
}
@@ -38,6 +38,7 @@
<rcfile>arpwatch.sh</rcfile>
<executable>arpwatch</executable>
<description>Arpwatch Daemon</description>
<starts_on_sync/>
</service>
<tabs>
<tab>

0 comments on commit aa78e49

Please sign in to comment.
You can’t perform that action at this time.