問題タブ [launchdagent]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
55 参照

macos - macOS でのグローバルな LaunchAgent の実装

複数のユーザー間で動作するグローバルな起動エージェントを実装しようとしていますが、ゴールまでたどり着けません。単一のユーザーに対しては完全に機能していますが、別のユーザーに切り替えると、起動エージェントが失敗しexit code 78 - function not implemented、エラーから何も理解できません。以下は私のplistです

に起動エージェントを配置し、/Library/LaunchAgents/com.my.company.agent.plist実行するとls -al /Library/LaunchAgents/com.my.company.agent.plist-rw-r--r-- 1 root wheel 752 Jan 21 13:27 /Library/LaunchAgents/com.my.company.agent.plist

/Library/LaunchAgents の権限はdrwxr-xr-x 8 root wheel 256 Jan 21 13:32 /Library/LaunchAgents

このコマンドを使用してエージェントをロードしています/bin/launchctl load /Library/LaunchAgents/com.my.company.agent.plist

を実行するls -al /Applications/MyApp.app/Contents/Resources/runscript.shと、 が得られ-rwxr-xr-x 1 root wheel 227 Jan 21 13:28 /Applications/MyApp.app/Contents/Resources/runscript.shます。

runscript.sh の内容は

他のstackoverlfowの推奨事項によると、構成全体は問題ないようで、起動エージェントは最初のユーザーでうまく機能しますが、2番目のユーザーからロードしようとするとすぐに78の終了コードで失敗します。