You are not logged in.

#1 2016-12-29 09:01:01

Asbestbrezel
Member
Registered: 2014-07-27
Posts: 67

start service after bluetooth is unblocked

Hello,

i got a problem with starting my bluealsa.service at boot-time. If bluetooth is soft or hardblocked it fails to start, so there should be a method, that it waits, until its unblocked.
How to do that?

[marcel@Django ~]$ systemctl status bluealsa
● bluealsa.service - BluezAlsa proxy
   Loaded: loaded (/usr/lib/systemd/system/bluealsa.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2016-12-29 09:53:43 CET; 7min ago
  Process: 511 ExecStart=/usr/bin/bluealsa (code=exited, status=1/FAILURE)
 Main PID: 511 (code=exited, status=1/FAILURE)

Dez 29 09:53:43 Django systemd[1]: Started BluezAlsa proxy.
Dez 29 09:53:43 Django bluealsa[511]: /usr/bin/bluealsa: No HCI device available
Dez 29 09:53:43 Django systemd[1]: bluealsa.service: Main process exited, code=exited, status=1/FAILURE
Dez 29 09:53:43 Django systemd[1]: bluealsa.service: Unit entered failed state.
Dez 29 09:53:43 Django systemd[1]: bluealsa.service: Failed with result 'exit-code'.

Offline

#2 2016-12-29 09:08:46

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: start service after bluetooth is unblocked


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2016-12-29 10:11:01

Asbestbrezel
Member
Registered: 2014-07-27
Posts: 67

Re: start service after bluetooth is unblocked

ok, i changed the file /usr/lib/systemd/system/bluealsa.service to

[Unit]
Description=BluezAlsa proxy
Requires=bluetooth.target
After=bluetooth.service

[Service]
Type=simple
User=bluealsa
Group=audio
ExecStart=/usr/bin/bluealsa

[Install]
WantedBy=multi-user.target

But still it fails.

Last edited by Asbestbrezel (2016-12-29 10:12:01)

Offline

Board footer

Powered by FluxBB