Brew Service

Mac下的PackageManager的Service管理

brew services list  # 查看使用brew安装的服務
brew services run formula | --all  # 啟動服務,不註冊
brew services start formula | --all  # 啟動服務,註冊
brew services stop formula | --all   # 停止服務,取消註冊
brew services restart formula | --all  # 重啟服務,註冊
brew services cleanup  # 清除無用的服務與配置

--all # run subcommand on all services.

If (sudo is passed){
    operate on /Library/LaunchDaemons (started at boot).
}else{
    Otherwise, operate on ~/Library/LaunchAgents (started at login).
}