From b8d8c2a9418eb75fa4362c743881502e5b252fd5 Mon Sep 17 00:00:00 2001 From: Jonathan Cave Date: Wed, 9 Jan 2019 11:21:49 +0000 Subject: bluetooth: add bluez controller detect job --- units/bluetooth/jobs.pxu | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'units') diff --git a/units/bluetooth/jobs.pxu b/units/bluetooth/jobs.pxu index 3b71e70..f40a6e0 100644 --- a/units/bluetooth/jobs.pxu +++ b/units/bluetooth/jobs.pxu @@ -10,6 +10,22 @@ flags: preserve-locale requires: manifest.has_bt_adapter imports: from com.canonical.plainbox import manifest +id: bluetooth/bluez-controller-detect +category_id: com.canonical.plainbox::bluetooth +_summary: Check bluez lists a controller if rfkill detects one +plugin: shell +user: root +depends: bluetooth/detect +template-engine: jinja2 +requires: + package.name == 'bluez' or snap.name == 'bluez' + {%- if __on_ubuntucore__ %} + connections.slot == 'bluez:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:bluez' + {% endif -%} +command: + bluez_list_adapters.py +estimated_duration: 2s +flags: preserve-locale plugin: shell category_id: com.canonical.plainbox::bluetooth -- cgit v1.2.3