Menu
  • HOME
  • TAGS

How should be the launchd file be if I don't want the deamon to load and/or start automatically?

mysql,osx-mavericks,launchd,launch-daemon

Change your KeepAlive key to <key>KeepAlive</key> <dict> <key>AfterInitialDemand</key> <true/> <key>Crashed</key> <true/> <key>SuccessfulExit</key> <false/> </dict> This will restart your job when mysqld has crashed or terminated with an error code. The AfterInitialDemand subkey makes sure the job is not started when loaded....

Daemon to know when a user logs into the MAC

osx,cocoa,launch-daemon

Use SCDynamicStoreCopyConsoleUser to get the console user name. CFStringRef consoleUserName = nil; uid_t uid; gid_t gid; consoleUserName = SCDynamicStoreCopyConsoleUser(NULL, &uid, &gid); Store consoleUserName in some member variable. Now creates a session to interact with the dynamic store maintained by the System Configuration server using SCDynamicStoreCreate SCDynamicStoreRef store; CFStringRef key; CFArrayRef...