launchd

MacPorts Apache2 Stopped Launching on Boot

北城余情 提交于 2019-12-04 04:50:23
Something that I've noticed recently on two different machines is that Apache2 installed via MacPorts seems to have stopped launching when I boot up. The honest truth is that I can't swear it did so before, but it's something I think I'd notice because installing the LaunchDaemon is part of my install process. In fact, if I try to reload the LaunchDaemon, it fails: $ sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist org.macports.apache2: Already loaded Unless I start Apache manually (using sudo apachectl restart ), grep'ing for either "apache2" or "httpd" in my process

How can I stop the Pow server from starting up at computer boot (OS X)?

僤鯓⒐⒋嵵緔 提交于 2019-12-03 21:13:33
问题 TL;DR: Is there a way to disable the Pow server from starting when my machine boots up, but retain the ability to launch the server manually via powder up when I need it to run? I am using Pow for my local development (and managing via the Powder gem). I'd like to set up Pow so that the server isn't started automatically on boot, as running it drains my battery life and I'm not always coding. Pow has added itself to launchd and I can't seem to get to a scenario where the Pow server is not

Mac OS X: Launching an app using NSWorkspace from a daemon doesn't work if the daemon is run as root

若如初见. 提交于 2019-12-03 20:25:57
I created a Command Line Tool app using Xcode. In that app, I used NSWorkspace to launch another application bundle (.app) as suggested here. MacOsX: How to launch an application (.app) from a "Command Line Tool" type of app All seem to work fine until I tried to start that Command Line Tool app as a daemon using launchctl. If the daemon is run as the currently logged in user, then the Command Line Tool app launches the external app just fine. If the daemon is run as root, then the Command Line Tool app cannot launch the external app. Using NSWorkspace to open an app doesn't seem to work if

iPhone app crashes when launched from Xcode, but not from iPhone

老子叫甜甜 提交于 2019-12-03 17:31:06
I have an app that is crashing on the iPhone, but only when it launched via Xcode. I can see in the iPhone console log that the app receives a memory warning, and then there are some strange events like these: Sun Jul 11 00:03:43 Matts-iPhone com.apple.launchd[1] (UIKitApplication:com.mycom.myapp[0x3f60][5591]) <Notice>: (UIKitApplication:com.mycom.myapp[0x3f60]) Bug: launchd_core_logic.c:3270 (24132):0 Sun Jul 11 00:03:43 Matts-iPhone com.apple.debugserver-48[5590] <Warning>: 1 [15d6/1403]: error: ::read ( 6, 0x3809f4, 1024 ) => -1 err = Bad file descriptor (0x00000009) Sun Jul 11 00:03:43

LaunchEvents key unrecognized in launchd plist (detecting USB device)

谁说我不能喝 提交于 2019-12-03 16:30:31
I want to launch a specific app when a USB device is plugged in to a Mac OS X system. I've followed the recipe given in this SO post . But it appears the LaunchEvents key is not recognized: When I reboot my system, I see the following message on the console: com.apple.launchd.peruser.501[173] (com.example.program) Unknown key for dictionary: LaunchEvents I am running OS X 10.6.8, and it's entirely possible that xpc_events aren't supported in this version of OS X. If this is the case, what are my alternatives? (As a second, lesser question: is there a way to force a re-read of my .plist file

Launchd.plist with WatchPaths key: How to set a minimum interval?

a 夏天 提交于 2019-12-03 14:58:46
How would one set a minimum interval for a launchd.plist script with a WatchPath key? For example, I want to run a script every time new files appear in a directory, but I would like it to only run once an hour at maximum. The launchd.plist might look something like this: <?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>org.me.pytag</string> <key>ProgramArguments</key> <array> <string>/Users/me/bin/pytag.py</string> </array> <key>WatchPaths

Making Mac OSX launchctl launch a process as root on startup

孤者浪人 提交于 2019-12-03 09:36:24
问题 My question is how to make a MacOSX daemon process using launchd start with root privileges automatically after a reboot? I'm writing an application for in house use that blocks access to web sites. It is written in python and modifies the /ect/hosts file to disable or enable listed urls. The main application is in django and I created a python twisted daemon that does the actual modification of the /etc/hosts file as root access privileges are required. I have created a plist file which

OSX launchd plist for node forever process

帅比萌擦擦* 提交于 2019-12-03 07:38:22
问题 I am trying to write a launchd.plist file for my node server. I am using forever to run my node server. I would like the server to start on boot. I would also like to wait for the mongodb launchd plist to run first. I installed mongobb using homebrew and it came with a launchd.plist already. I have executed the following: $ launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mongodb.plist plist for mongodb is: <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs

what does launchd status 78 mean?? why my user agent not running??

坚强是说给别人听的谎言 提交于 2019-12-03 04:44:23
问题 I want to run a unison sync service running in the background whenever I login. But the status code of my agent is 78 . I don't know why, I tried some fix posted online, but it just doesn't work. What's the problem?? below is the plist file for my service. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>syncmyproject</string> <key>StandardOutPath<

How to know a specific launchd.plist file location?

我只是一个虾纸丫 提交于 2019-12-03 01:40:42
Is it possible to know the .plist file location which is loaded into the launchctl command? The label name is listed with "launchctl list" and its contents can be viewed by "launchctl list LABEL", but I cannot find the .plist file location. I know it will be located in /Library/LaunchAgent or ~/Library/LaunchAgent or something, but I don't want to search around paths while all jobs is listed with the launchctl command. This issue comes up a lot and unfortunately locate and mdfind both don't show results from the appropriate directories on my system. I put the following function in my .bashrc