From f43f3cb73ff3f8f9c20e8e9efe533ff19e9d3fc6 Mon Sep 17 00:00:00 2001 From: Loïc Collignon Date: Mon, 23 Jul 2018 00:48:19 +0200 Subject: Fix issue with the unit file detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix a bug introduced by the commit e4e0b9b, due to the wildcard in the unit file. Change-Id: Iddc47378207a0ced207861433cd0ec02a52bc1a5 Signed-off-by: Loïc Collignon --- bin/lib4a-tools.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/lib4a-tools.sh') diff --git a/bin/lib4a-tools.sh b/bin/lib4a-tools.sh index ab0ee18..776b1c0 100644 --- a/bin/lib4a-tools.sh +++ b/bin/lib4a-tools.sh @@ -26,8 +26,9 @@ function 4a-client() { # get port for audio service local port="" local token="HELLO" + local unitfile=$( ls /var/local/lib/systemd/system/afm-service-agl-service-audio-4a*.service ) - if [ -f "/var/local/lib/systemd/system/afm-service-agl-service-audio-4a*.service" ]; then + if [ -f "$unitfile" ]; then log "Detected systemd unit file!" port=$( grep -sr X-AFM-http /var/local/lib/systemd/system/afm-service-agl-service-audio-4a*.service | cut -f2 -d'=' ) log "Port detected: $port" -- cgit 1.2.3-korg