Open oissevalt opened 1 month ago
目前在 macOS 上将海豹运行为服务,会创建 /Library/LaunchDaemons/sealdice.plist 并写入:
/Library/LaunchDaemons/sealdice.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>Disabled</key> <false/> <key>KeepAlive</key> <true/> <key>Label</key> <string>sealdice</string> <key>ProgramArguments</key> <array> <string>/海豹目录/sealdice-core</string> </array> <key>RunAtLoad</key> <false/> <key>SessionCreate</key> <false/> <key>StandardErrorPath</key> <string>/var/log/sealdice.err.log</string> <key>StandardOutPath</key> <string>/var/log/sealdice.out.log</string> <key>WorkingDirectory</key> <string>/海豹目录/sealdice146</string> </dict> </plist>
此行为有如下不妥:
/Library/LaunchDaemons
launchctl start
launchctl stop
launchctl bootstrap
launchctl bootout
sudo launchctl bootout system/sealdice
目前在 macOS 上将海豹运行为服务,会创建
/Library/LaunchDaemons/sealdice.plist
并写入:此行为有如下不妥:
/Library/LaunchDaemons
中创建的服务是放在 system 域下的,用户操作需要 sudo 权限;launchctl start
和launchctl stop
来开关服务,而要用launchctl bootstrap
和launchctl bootout
;sudo launchctl bootout system/sealdice
停止。