Skip to main content
Topic: Problems creating user service for cdemu-daemon (Read 427 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Problems creating user service for cdemu-daemon

I'm sure there's a simple fix for this but after some googling I'm at a loss.  I also know there's probably another way of getting the daemon running but I feel like dinit-userservd should do the job if I could do it properly.

When I run cdemu-daemon from the console I get this output:
Code: [Select]
Starting CDEmu daemon with following parameters:
 - config file: (null) (exists: 0)
 - num devices: 1
 - control device: /dev/vhba_ctl
 - audio driver: null
 - bus type: session
 - default CDEmu debug mask: 0x0
 - default libMirage debug mask: 0x0

Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)

The process never daemonizes (the console remains occupied) which I think is related to my issue.  This is my service file:
Code: [Select]
type = process
load-options = sub-vars
logfile = $HOME/.local/share/dinit/cdemu.log
command = /usr/bin/cdemu-daemon
restart = true
depends-on = dbus.user

The logfile contains the same information that is displayed when running from console, but the dinit-userservd log file contains this:
Code: [Select]
dinit: Service cdemu.user with pid 17928 exceeded allowed start time; cancelling.
dinit: Interrupting start of service cdemu.user with pid 17928 (with SIGINT).
[FAILED] cdemu.user

Even though the daemon does run, any idea what I'm doing wrong?  I tried setting type to bgprocess but same result.

Re: Problems creating user service for cdemu-daemon

Reply #1
The "exceeded allowed start time" message shouldn't occur with a service using the configuration you specified.

Are you certain you didn't have it set to 'type = scripted' or 'type = bgprocess' initially, then perhaps modified the service description file without doing "dinitctl reload cdemu.user"?

Re: Problems creating user service for cdemu-daemon

Reply #2
Hmm I am sure that I started with 'type = process' then tried 'type = bgprocess' when that failed.  However, it now appears to be working fine.  Is there something special about the 'dinitctl reload' command that I'm not aware of?  I tried both 'dinitctl enable' and simply 'dinitctl start' before and they both gave me the same trouble.

 

Re: Problems creating user service for cdemu-daemon

Reply #3
There's nothing particularly special about 'dinitctl reload', it just reloads the service description. So if it fixed the issue then it really sounds like you accidentally had the wrong service type (or you had a 'ready-notification' setting) to begin with. If you're sure that's not the case see if you can reproduce the problem (start fresh and do the same thing again) and if it does happen again you can open an issue on dinit in github if you want (https://github.com/davmac314/dinit).