Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

brew services: where to edit configuration?

Brew services has installed this plist file for mysql.

~ $ brew services list Name    Status  User      Plist mysql56 started mh /Users/mh/Library/LaunchAgents/homebrew.mxcl.mysql56.plist 

Is this file safe to edit (i.e. will brew ever overwrite changes made here)? Is there another method I should use to modify the file?

like image 862
Mark Harrison Avatar asked Mar 18 '16 16:03

Mark Harrison


People also ask

Where is homebrew MXCL mysql plist?

If you did a custom install of the plist, the file homebrew. mxcl. mysql. plist may reside in /Library/LaunchAgents.

Where are BREW services logs?

The usual logs end up in /usr/local/var/log/ .

What does BREW services do?

Brew handles the complexity of parsing each package and then issues the appropriate launchctl commands for you. So in the end, launchctl and launchd do the lifting, brew just is an intermediary to make it easier for you to get going. Manage background services with macOS' launchctl(1) daemon manager.


1 Answers

All .plist files that come with Formulas can be found in Cellar dir. For instance homebrew.mxcl.mysql.plist is in /usr/local/Cellar/mysql/5.7.14. You can modify it and  brew services will use it.

Alternatively you can modify /Library/LaunchDaemons/homebrew.mxcl.mysql.plist and make it immutable with sudo chflags uchg /Library/LaunchDaemons/homebrew.mxcl.mysql.plist. This won't allow brew to rewrite or modify .plist file.

like image 169
Bobelev Avatar answered Oct 03 '22 22:10

Bobelev