diff --git a/checkin_notes b/checkin_notes index fd63a62d06..92069c2a09 100644 --- a/checkin_notes +++ b/checkin_notes @@ -111,11 +111,15 @@ David Jan 4 2008 Charlie Jan 6 2008 - Mac Client: more idle time tweaks to allow running as a daemon by using Mac OS X's launchd mechanism. - - Mac: Update script which sets BOINC up to run as a daemon so it + - Mac Installer: if system is set up to run BOINC Client as a daemon + using launchd, use launchctl to launch newly installed Client as + a daemon. client/ hostinfo_unix.C main.C + mac_installer/ + PostInstall.cpp David Jan 6 2007 - web: bug fixes diff --git a/mac_installer/PostInstall.cpp b/mac_installer/PostInstall.cpp index f23ff02e08..944e166e51 100755 --- a/mac_installer/PostInstall.cpp +++ b/mac_installer/PostInstall.cpp @@ -352,9 +352,16 @@ int DeleteReceipt() err_fsref = FSPathMakeRef((StringPtr)"/Applications/BOINCManager.app", &fileRef, NULL); } - if (finalInstallAction == launchWhenDone) - if (err_fsref == noErr) + if (finalInstallAction == launchWhenDone) { + if (err_fsref == noErr) { + // If system is set up to run BOINC Client as a daemon using launchd, launch it + // as a daemon and allow time for client to start before launching BOINC Manager. + system("launchctl unload /Library/LaunchDaemons/edu.berkeley.boinc.plist"); + i = system("launchctl load /Library/LaunchDaemons/edu.berkeley.boinc.plist"); + if (i == 0) sleep (2); err = LSOpenFSRef(&fileRef, NULL); + } + } return 0; }