.plist无法使进程保持活动状态

时间:2019-06-27 04:06:53

标签: macos plist launchctl

我正在尝试在Mac服务器上设置FreeRADIUS。我的RADIUS服务器工作正常,唯一的问题是在系统重新引导时我无法使其保持活动状态。以下是我在/Library/LaunchDaemons/org.freeradius.radiusd.plist中拥有的plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>KeepAlive</key>
    <true/>

    <key>RunAtLoad</key>
    <true/>

    <key>EnableTransactions</key>
    <true/>

    <key>Label</key>
    <string>org.freeradius.radiusd</string>

    <key>StandardErrorPath</key>
    <string>/tmp/mycommand.err</string>

    <key>StandardOutPath</key>
    <string>/tmp/mycommand.out</string>

    <key>ProgramArguments</key>
    <array>
      <string>/usr/local/bin/radiusd</string>
      <string>-X</string>
      <string>-d</string>
      <string>/usr/local/etc/raddb</string>
    </array>
  </dict>
</plist>

重新启动后,使用以下命令

sudo launchctl load -w /Library/LaunchDaemons/org.freeradius.radiusd.plist

服务器启动正常,没有任何问题,并且保持活动状态。

我已经查看了/tmp/mycommand.out中的输出(.err为空),最后两行是:

Listening on auth address * port 1812 bound to server default
Listening on acct address * port 1813 bound to server default
Listening on auth address :: port 1812 bound to server default
Listening on acct address :: port 1813 bound to server default
Listening on auth address 127.0.0.1 port 18120 bound to server inner-tunnel
Listening on proxy address * port 53565
Listening on proxy address :: port 53566
Ready to process requests

所以它似乎正在启动。

我还检查了plist上的权限,以下是它们

-rw-r--r--   1 root  wheel   738 27 Jun 11:41 org.freeradius.radiusd.plist

有什么想法吗?

0 个答案:

没有答案