brew服务:在哪里编辑配置? [英] brew services: where to edit configuration?

查看:104
本文介绍了brew服务:在哪里编辑配置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆