Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with runit or other systemd alternatives #25

Open
tb418 opened this issue Jun 6, 2021 · 5 comments
Open

Use with runit or other systemd alternatives #25

tb418 opened this issue Jun 6, 2021 · 5 comments

Comments

@tb418
Copy link

tb418 commented Jun 6, 2021

I am using Artix Linux with Runit and when I try to start nxbt it comes up with this error:
Traceback (most recent call last): File "/usr/bin/nxbt", line 8, in <module> sys.exit(main()) File "/usr/lib/python3.9/site-packages/nxbt/cli.py", line 223, in main demo() File "/usr/lib/python3.9/site-packages/nxbt/cli.py", line 139, in demo nx = Nxbt(debug=args.debug, log_to_file=args.logfile) File "/usr/lib/python3.9/site-packages/nxbt/nxbt.py", line 181, in __init__ toggle_input_plugin(False) File "/usr/lib/python3.9/site-packages/nxbt/bluez.py", line 108, in toggle_input_plugin with open(service_path, "r") as f: FileNotFoundError: [Errno 2] No such file or directory: '/lib/systemd/system/bluetooth.service'
I can't do anything without modifying the code and I don't really want to spend time changing the code. Please could you add support for at least runit. Thanks.

@dogtopus
Copy link

dogtopus commented Aug 14, 2021

Worse: It also doesn't respect the systemd's unit file overriding mechanisms and just overwrite the packaged unit files, which could upset some package managers when users update.

I would remove it entirely and just let people use systemctl edit --full bluetooth or any other ways corresponding to their init instead.

(Actually I think #19 is better. That plus some detection to non-systemd init should work.)

@Brikwerk
Copy link
Owner

Brikwerk commented Jan 1, 2022

Apologies for the extended time it's taken me to address this issue. I've implemented some preliminary systemd detection into the BlueZ toggle so that NXBT will at least attempt to run on non-systemd installations (086293d). It would be great to hear if this successfully helps non-systemd users.

One catch with this approach, however, is that the user may have to disable the BlueZ input plugin (or any other interfering plugins) manually. I unfortunately don't have the bandwidth to implement full support for runit/alternatives, at the moment. I would, though, be happy to review a PR implementing further specific support.

@typenoob
Copy link

I thought it‘s important to add service support in toggle_clean_bluez at least.At present, , for non-systemd users, temporary approach is to comment all code in this function.

@typenoob
Copy link

Alright,for openwrt/procd users,here is my advice:

  1. Modify file /etc/init.d/bluetoothd
    image
  2. Add file /etc/config/bluetoothd
    image
  3. exec uci commit
  4. exec service bluetoothd restart

@typenoob
Copy link

The "default SysV Init" parameter file or directory is variable. You should modify the config file depend on the ditros.
For example,debian users can modify the file /etc/default/bluetooth

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants