Skip to content

Commit

Permalink
improve display conf
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Aug 29, 2024
1 parent 0f941be commit 704d4c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/class/mqtt2.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function syncTopicToJeedomCloud($_local_topic = '',$_remote_topic
$conf .= "bridge_cafile ".__DIR__."/../config/ca_jeedom_cloud.crt\n";
$conf .= "# End autogenerate for ".$_local_topic." -> ".$_remote_topic."\n";
$current_conf = preg_replace('/(# Begin autogenerate for '.$_local_topic.' -> '.$_remote_topic.')((.|\n)*)(# End autogenerate for '.$_local_topic.' -> '.$_remote_topic.')/m', "", config::byKey('mosquitto::parameters', __CLASS__));
config::save('mosquitto::parameters', $current_conf."\n\n".$conf, __CLASS__);
config::save('mosquitto::parameters', trim($current_conf)."\n\n".trim($conf), __CLASS__);
mqtt2::installMosquitto(config::byKey('mode', 'mqtt2'));
}

Expand Down

0 comments on commit 704d4c0

Please sign in to comment.