AGMServiceをアンインストールする時に調べたメモ。というか日本語訳。
launchctlの主要コマンド説明
launchctl start <label>
:ジョブをstartします。これは通常、特定のジョブをテストまたはデバッグするためだけに予約されています。launchctl stop <label>
:ジョブをstopします。startの反対であり、ジョブが実行を継続するように構成されている場合、ジョブがすぐにrestartされる可能性があります。
launchctl remove <label>
:launchdからジョブを削除しますが、非同期です。ジョブが実際に停止するのを待たずに戻るので、このジョブでのエラー処理はありません。
launchctl load <path>
:ジョブがdisabled状態でない限り、ジョブをloadして開始します。launchctl unload <path>
:ジョブをstopしてunloadします。ジョブは次回のログイン/リブート時にrestartします。
launchctl load -w <path>
:ジョブをnot disabled状態にして、loadしてstartします。ジョブは次回のログイン/リブート時にrestartします。launchctl unload -w <path>
:ジョブをstopしてunloadし、disabledにします。次回のログイン/リブート時にジョブはrestartしません。
参考

Launchctl difference between load and start, unload and stop
I was reading through the launchctl man page and have a few questions about its functioning:
What is the difference between load and start, unload and stop?
Wh...