From 704d4c0e074d4c4891463267c923d8d88a0c14c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc?= <1536036+zoic21@users.noreply.github.com> Date: Thu, 29 Aug 2024 10:50:09 +0200 Subject: [PATCH] improve display conf --- core/class/mqtt2.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/class/mqtt2.class.php b/core/class/mqtt2.class.php index fd5aab0..fba4fab 100644 --- a/core/class/mqtt2.class.php +++ b/core/class/mqtt2.class.php @@ -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')); }