mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-11-03 11:14:26 -05:00
MonitorsController::edit() restarted zmc through the CakePHP model but left the monitor's control server running. zmcontrol.pl reads ControlAddress, ControlDevice and the Control when it starts, so after an API edit PTZ kept using the old values: a camera password changed through the API kept failing PTZ with 401 until zmcontrol.pl was restarted by hand. Restart the daemons the way the console's save does (includes/actions/monitor.php), through ZM\Monitor: stop zmc and, for a controllable monitor, zmcontrol.pl; start them again from the saved row unless the monitor does not capture, is a WebSite or is deleted. ZM\Monitor also sends the commands to the monitor's own server in a multi-server setup, where the model's daemonControl() logged an error and did nothing. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>