From 2b49711d43de2b91043b5dd4d8e5576cee9743dd Mon Sep 17 00:00:00 2001 From: David Andreoletti Date: Tue, 2 Apr 2024 23:53:17 +0800 Subject: [PATCH] shairport-sync: fixed diagnostics settings shairport-sync expects statistics/log_verbosity/log_output_to settings to be in the diagnostics section of shairport-sync's native config. Prior to this commit, these settings were either missing (log_output_to) or generated in the incorrect (general) native config section bloc. Signed-off-by: David Andreoletti --- sound/shairport-sync/files/shairport-sync.config | 8 ++++++-- sound/shairport-sync/files/shairport-sync.init | 13 +++++++++++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/sound/shairport-sync/files/shairport-sync.config b/sound/shairport-sync/files/shairport-sync.config index 42a4acf1d7..d0bd4fad72 100644 --- a/sound/shairport-sync/files/shairport-sync.config +++ b/sound/shairport-sync/files/shairport-sync.config @@ -18,10 +18,10 @@ config shairport-sync 'shairport_sync' option port '' # 5000 option udp_port_base '' # 6001 option udp_port_range '' # 100 - option statistics '' # no/yes + option statistics '' # no/yes - DEPRECATED: This option will be removed in a future release. Use 'diagnostics_statistics' instead option drift '' # 88 option resync_threshold '' # 2205 - option log_verbosity '' # 0/1/2/3 + option log_verbosity '' # 0/1/2/3 - DEPRECATED: This option will be removed in a future release. Use 'diagnostics_log_verbosity' instead option ignore_volume_control '' # no/yes option volume_range_db '' # 30 to 150 option regtype '' # _raop._tcp @@ -74,3 +74,7 @@ config shairport-sync 'shairport_sync' # AO option ao_latency_offset '' # 0 option ao_buffer_length '' # 44100 + # Diagnostics + option diagnostics_statistics '' # no/yes + option diagnostics_log_output_to '' # syslog/stderr/stdout + option diagnostics_log_verbosity '' # 0/1/2/3 diff --git a/sound/shairport-sync/files/shairport-sync.init b/sound/shairport-sync/files/shairport-sync.init index 1533970405..6eafcd02d9 100644 --- a/sound/shairport-sync/files/shairport-sync.init +++ b/sound/shairport-sync/files/shairport-sync.init @@ -56,10 +56,8 @@ start_instance() { append_num "$cfg" port "port" append_num "$cfg" udp_port_base "udp_port_base" append_num "$cfg" udp_port_range "udp_port_range" - append_str "$cfg" statistics "statistics" append_num "$cfg" drift "drift" append_num "$cfg" resync_threshold "resync_threshold" - append_num "$cfg" log_verbosity "log_verbosity" append_str "$cfg" ignore_volume_control "ignore_volume_control" append_num "$cfg" volume_range_db "volume_range_db" append_str "$cfg" regtype "regtype" @@ -141,6 +139,17 @@ start_instance() { append_num "$cfg" ao_latency_offset "audio_backend_latency_offset" append_num "$cfg" ao_buffer_length "audio_backend_buffer_desired_length" printf "};\n\n" + + # Diagnostics + config_get log_verbosity "$cfg" log_verbosity + config_get statistics "$cfg" statistics + + printf "diagnostics =\n" + printf "{\n" + append_str "$cfg" diagnostics_statistics "statistics" "${statistics}" + append_str "$cfg" diagnostics_log_output_to "log_output_to" + append_num "$cfg" diagnostics_log_verbosity "log_verbosity" "${log_verbosity}" + printf "};\n\n" } > "$conf_file" procd_open_instance -- 2.30.2