brew services: where to edit configuration?

Mark Harrison picture Mark Harrison · Mar 18, 2016 · Viewed 12.6k times · Source

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?

Answer

Bobelev picture Bobelev · Aug 2, 2016

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.