MacOS:手动强制守护进程启动

时间:2012-05-10 09:43:07

标签: macos unix daemon launchd

我在/ Library / LaunchDaemon /

中创建了一个plist文件

运行它的计算机无法重启(服务器事物),它正在运行MacOS Tiger。我期望以下命令来完成这项工作,但它声明它并不意味着直接运行:

launchd /Library/LaunchDaemon/parallel.plist

如何实现这一目标? 谢谢!

2 个答案:

答案 0 :(得分:10)

sudo launchctl load /Library/LaunchDaemons/parallel.plist

应该使守护进程自动运行。

请参阅 http://www.aandcp.com/launchdaemons-and-mac-os-x-openvpn-as-an-example

答案 1 :(得分:1)

我知道这篇文章已经有了答案,但因为这是一个不常见的话题,我想我也会权衡一下。对我有用的命令是

sudo launchctl kickstart system/com.example.service

这个守护进程的 plist 需要在 /Library/LaunchDaemons 中。