Skip to content

Can't start service without sudo #265

Closed Answered by mobin-2008
omnigenous asked this question in Q&A
Discussion options

You must be logged in to vote

Hi.

I think you misunderstood about using dinit as service manager.
For running a service as any user than root you have these options:

  1. Running your service in system instance of dinit. You should create a service for system instance of dinit in /etc/dinit.d/ or /lib/dinit.d/ or /usr/local/lib/dinit.d directory and set run-as option as your user:

    command = /usr/bin/my_daemon
    run-as = mobin
    ...
  2. Running a user instance of dinit and put your service on it. You should create ~/.config/dinit.d and create boot service at threre and run dinit as your user by dinit & command. then put your services on ~/.config/dinit.d directory and start them with dinitctl without sudo and as your user: dini…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@omnigenous
Comment options

@mobin-2008
Comment options

Answer selected by omnigenous
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants