| OS X - Operating System General OS operation information and support |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Nov 11, 2009
Posts: 2
![]() |
hello,
i have to create a daemon on a Mac OSX. the daemon must start when the Mac boots up. i have therefore wrote a daemon (using RealBasic), and also wrote a plist file which points to the daemon. everything has been running just fine on Mac OSX 10.4 for months. Now i have copied everything to Snow Leopard 10.6 and am having a small problem. let me explain what i have done so far. 1) i have created a plist file, called "myTestDaemon.plist", which lives in system/library/launchdaemons. the file is exactly this: Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>myNewTestDaemon</string> <key>ProgramArguments</key> <array> <string>/Users/Paul/Desktop/RealBasic_Projects/My_Application</string> </array> <key>RunAtLoad</key> <true/> </dict> </plist> 3) i can then start the daemon using one of two methods - either by rebooting the Mac, in which case the launchd system tool automatically starts the daemon, or by starting the daemon manually using launchctl: Code:
sudo launchctl load /system/library/launchdaemons/myTestDaemon.plist Code:
sudo launchctl list now, i have done exactly the same thing on my shiney new Mac mini with Snow Leopard on it, but when i do the "launchctl load ...." command, it gives me an error: Code:
"nothing found to load" Code:
sudo launchctl load -F /system/library/launchdaemons/myTestDaemon.plist so i then explicitly added the key to my plist: Code:
<key>Disabled</key> <false/> like i say, this was all working in 10.4, and now not working in 10.6. So i imagine something has changed between version ? does my plist file look right ? all i need the daemon to do is start up at boot time. hope i have explained it well. if not please ask for more info. any help appreciated. |
| QUOTE Thanks | |
![]() Member Since: May 02, 2009
Posts: 480
![]() Mac Specs: MBP 2.33 4GB: MacPro 8 Core 2.8, 16GB: MacMini 2.26 4GB: MacMin 2.53 4GB: iPhone3GS 32GB
|
Have a look at this:
launchctl disabled key in 10.6? - macenterprise | Google Groups You may want to take a look at the /private/var/db/launchd.db/com.apple.launchd/overrides.plist file. Sounds like you service may have ended up there somehow. Thats the only thing I can think of. Everything else looks ok. Also, you may want to look at the logs in the /Applications/Utilities/Console application. Typically launchctrl gives extended information in the console logs. Oh, and welcome to the forums! Last edited by D3v1L80Y; 12-14-2009 at 09:23 AM. |
| QUOTE Thanks | |
![]() Member Since: Nov 11, 2009
Posts: 2
![]() |
Quote:
![]() heres the plist that im currently using, maybe it was extra keep-alive and disabled flags that made it work? Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>MyClientService</string> <key>ProgramArguments</key> <array> <string>/Users/me/Desktop/RealBasic_Projects/Test/MyClientService</string> </array> <key>KeepAlive</key> <true/> <key>Disabled</key> <false/> <key>RunAtLoad</key> <true/> </dict> </plist>
|
|
| QUOTE Thanks | ||
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Snow leopard disaster - apple is replacing my macbook pro.. | EntropyX | Switcher Hangout | 15 | 10-05-2010 04:04 AM |
| Snow Leopard and Time Machine | billwill | OS X - Apps and Games | 8 | 11-10-2009 08:46 AM |
| How Do I Uninstall Snow Leopard? | c12susan | OS X - Operating System | 3 | 09-23-2009 10:44 PM |
| Snow Leopard hangs on grey screen when usb hard drive attached | gilc | OS X - Operating System | 2 | 09-19-2009 06:44 PM |
| Leopard vs. snow leopard | morganm | OS X - Operating System | 13 | 09-05-2009 09:57 AM |
All times are GMT -4. The time now is 12:54 AM.
Powered by vBulletin