Skip to content
This repository has been archived by the owner. It is now read-only.

Services command results in startup errors when run with sudo #26214

Closed
wants to merge 1 commit into from

Conversation

@molawson
Copy link

@molawson molawson commented Jan 28, 2014

I've just started using the brew services commands and ran into problems when I tried to use them with sudo to have a few services (dnsmasq and nginx) launch at startup (e.g. sudo brew services start dnsmasq)

In both cases, I didn't get any errors from the services commands directly, but neither service would actually start. I checked out the system logs, and both services were exiting with error codes when launchd tried to start them.

It appears to be a permissions/ownership problem caused by my user name being added to the generated plist file here. I updated those lines to skip making the UserName edits if the command has been run as root. That has fixed the issue for me, and the non-sudo version of the command still works, as well, but I'm not sure if the assumption I've made in these changes is a valid one for all cases.

Thanks for taking a look! And here is the output the config, etc. commands.

@adamv adamv added the integration label Mar 10, 2014
@molawson
Copy link
Author

@molawson molawson commented Apr 22, 2014

Any chance I could get someone to take a look at this PR? If it needs more info or clarification, I'd be happy to do that.

@adamv
Copy link
Contributor

@adamv adamv commented Apr 23, 2014

@Homebrew/owners who owns the services command?

@MikeMcQuaid
Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Apr 23, 2014

@adamv No-one, it seems. I don't think any of us use it. I wonder about having such things in Contributions, honestly.

@adamv
Copy link
Contributor

@adamv adamv commented Apr 23, 2014

I suggest it be ejected to a separate repository maintained by those that use it or wrote it.

Ping @jhbruhn

Not sure who else to ping from the file history.

@adamv adamv added the contrib label Apr 23, 2014
@jhbruhn
Copy link
Contributor

@jhbruhn jhbruhn commented Apr 23, 2014

Uhm, AFAIK I never touched brew services. @adamv perhaps you opened brew-server? That's the only command I contributed to.

@adamv
Copy link
Contributor

@adamv adamv commented Apr 23, 2014

Sorry, I read the wrong file.

@adamv
Copy link
Contributor

@adamv adamv commented Apr 24, 2014

Ping @bjeanes & @chadcatlett - any interest in maintaining this command in an external repo?

@bjeanes
Copy link
Contributor

@bjeanes bjeanes commented Apr 24, 2014

I use it, but I consider the feature mostly broken. I really want a nice way to do it, but don't want to maintain it. +1 for removing it. It can be excavated and extracted later by those who are sufficiently motivated (possibly future me).

@chadcatlett
Copy link
Contributor

@chadcatlett chadcatlett commented May 2, 2014

I agree. While I do use it, it has a lot of issues. I'd say remove it until something better can come along, or someone creates something in their own repo.

@adamv adamv assigned adamv and unassigned adamv May 16, 2014
@jacknagel
Copy link
Contributor

@jacknagel jacknagel commented May 23, 2014

Closing because of #28657.

@jacknagel jacknagel closed this May 23, 2014
gapple referenced this pull request in Homebrew/homebrew-services Jul 3, 2015
@Homebrew Homebrew locked and limited conversation to collaborators Feb 17, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

7 participants
You can’t perform that action at this time.