Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mac os怎样配置ssdb开机启动 #25

Open
youmisun opened this issue Jun 24, 2017 · 1 comment
Open

mac os怎样配置ssdb开机启动 #25

youmisun opened this issue Jun 24, 2017 · 1 comment

Comments

@youmisun
Copy link

mac os系统没有/etc/init.d目录,应该如何配置?

@mingcheng
Copy link

编辑个 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>
    <dict>
      <key>SuccessfulExit</key>
      <false/>
    </dict>
    <key>Label</key>
    <string>ideawu.ssdb</string>
    <key>ProgramArguments</key>
    <array>
      <string>[path-to-ssdb]</string>
      <string>[path-to-configure-file]</string>
      <string>-d</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
  </dict>
</plist>

然后放到自己的 $HOME/Library/LaunchAgents 下面,然后 launchctl load <plist-file-name> 就可以了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants