Distrobox-init

I use distrobox and have created a container using --init. I am wondering if there is a way to start a service from container in host?

I use maestral, which is a lightweight dropbox sync app and it has a service file. Usually I have to enter container and make sure it is running or start it.

From:

Note that enabling --init will disable host’s process integration. From within the container you will not be able to see and manage host’s processes. This is needed because /sbin/init must be pid 1.

Actually, re-looked at my fish history, seems I did not create the container with --init, so would that make it possible?

Should be possible, here is an example service file that’s used/created by ujust install-resilio (if you want to take a look/experiment with it, just try the ujust command, and then delete the container if you don’t need it – maybe look at the raw just scripts as well).

Edit: actually, I just remembered - isn’t this exactly what Quadlet is for? Try taking a look at Desktop Quadlet if normal Quadlet don’t work for you.