summaryrefslogtreecommitdiffstats
path: root/bin/lib4a-tools.sh
diff options
context:
space:
mode:
authorLoïc Collignon <loic.collignon@iot.bzh>2018-07-23 00:48:19 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2019-04-24 14:18:11 +0200
commitf43f3cb73ff3f8f9c20e8e9efe533ff19e9d3fc6 (patch)
treec385f641368b17aaa93d477896ee8b37facbf655 /bin/lib4a-tools.sh
parenta7d8bd79006b87caf1af58ee4742f94fc59ea0d9 (diff)
Fix issue with the unit file detection
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 <loic.collignon@iot.bzh>
Diffstat (limited to 'bin/lib4a-tools.sh')
-rw-r--r--bin/lib4a-tools.sh3
1 files changed, 2 insertions, 1 deletions
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"