false, 'error' => 'Invalid flag name']); exit; } $ok = vv_conf_flag_set($name, $enabled); // master.conf is shared — propagate the change to partner hosts (no-op on non-owner). $push = []; if ($ok) { $push = vv_push_master_conf(); vv_push_setup_state(); } echo json_encode(['ok' => $ok, 'error' => $ok ? null : 'Failed to write master.conf', 'push' => $push]);