brew服务:在哪里编辑配置? [英] brew services: where to edit configuration?
问题描述
Brew服务已为mysql安装了此plist文件.
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
此文件是否可以安全编辑(即brew是否会覆盖此处所做的更改)?我应该使用另一种方法来修改文件吗?
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?
推荐答案
公式附带的所有.plist
文件都可以在Cellar目录中找到.例如,homebrew.mxcl.mysql.plist
在/usr/local/Cellar/mysql/5.7.14
中.您可以对其进行修改,brew services
将使用它.
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.
或者,您可以修改/Library/LaunchDaemons/homebrew.mxcl.mysql.plist
并将其与sudo chflags uchg /Library/LaunchDaemons/homebrew.mxcl.mysql.plist
保持不变.这将不允许brew
重写或修改.plist
文件.
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.
这篇关于brew服务:在哪里编辑配置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!