mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 00:07:26 +00:00
system: refine gateway watcher service behaviour
Allow a (re)start and make it the "main" service.
This commit is contained in:
parent
b6c3ab45e7
commit
49a6b614a3
@ -73,7 +73,8 @@ function dpinger_services()
|
||||
$pconfig['verbose'] = false;
|
||||
$pconfig['id'] = ':watcher:';
|
||||
$pconfig['locked'] = true;
|
||||
$services[] = $pconfig;
|
||||
/* add as first entry which is used as "global" control */
|
||||
array_unshift($services, $pconfig);
|
||||
}
|
||||
|
||||
return $services;
|
||||
@ -181,6 +182,11 @@ function dpinger_configure_do($verbose = false, $gwname = null, $bootup = false)
|
||||
@unlink($process['socket']);
|
||||
}
|
||||
|
||||
if (!empty($gwname) && $gwname == ':watcher:') {
|
||||
/* allow the watcher to be restarted as well */
|
||||
killbypid('/var/run/gateway_watcher.pid');
|
||||
}
|
||||
|
||||
$ifconfig_details = legacy_interfaces_details();
|
||||
$dpinger_default = dpinger_defaults();
|
||||
$dpinger_instaces = dpinger_instances($ifconfig_details);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user