launchctl

Apple의 launchd 관리자에서 시스템 전역 서비스인 시작 데몬과 사용자별 프로그램인 시작 에이전트를 제어. launchd는 적절한 위치에 배치된 XML 기반 *.plist 파일을 로드하고, 정의된 일정에 따라 해당 명령을 실행. 더 많은 정보: https://keith.github.io/xcode-man-pages/launchctl.1.html.

launchctl load ~/Library/LaunchAgents/{{내_스크립트}}.plist

sudo launchctl load /Library/LaunchAgents/{{루트_스크립트}}.plist

sudo launchctl load /Library/LaunchDaemons/{{스크립트_대몬}}.plist

launchctl list

launchctl unload ~/Library/LaunchAgents/{{내_스크립트}}.plist

launchctl start {{스크립트_파일}}

launchctl stop {{스크립트_파일}}