launchd is a Mac OS X daemon that manages launching programs and network services on behalf of the system or individual users. It attempts to replace most of the functionality of traditional UNIX init, cron, inetd, and other system services.

learn more… | top users | synonyms

1
vote
1answer
21 views

How do you control the file ownership of a socket managed by launchd

I'm working on writing a daemon that talks to other daemons in the same project over UNIX sockets. For security purposes, it's critical that these daemons only talk amongst themselves (and can't, for ...
0
votes
1answer
67 views

Launchd job runs but then quits immediately

I wish to load and run a Lisp program in CCL in the background automatically when my Mac (OS 10.9) boots. I have a launchd plist that I've saved to /Library/LaunchDaemons, <?xml version="1.0" ...
1
vote
2answers
195 views

How to shutdown VMware Fusion virtual machine on host shutdown

I have a Mac mini running Mavericks server. I installed the Atmail server + webmail vm [a linux centos distribution] in VMware Fusion Professional 6 with the VMware Tools addon. It works flawlessly. ...
1
vote
1answer
29 views

How to generate a signature with a launchd plist? [closed]

Is it possible to implement the following shell script completely as a launchd plist to generate a signature with timestamp in the StandardErrorPath / StandardErrorPath files? #!/bin/sh echo "Hi, ...
0
votes
1answer
181 views

launchctl won't load php-fpm with this LaunchAgent

I'm trying to start php-fpm with launchctl. Running directly from the command line is no problem: $ /usr/sbin/php-fpm -p /Users/dmitry -e Here's the contents of ...
0
votes
0answers
47 views

Java daemon: “…not allowed access to the window system right now.” on boot

I have a daemon (/Library/LaunchDaemons/...) configured to launch on boot. However, I get the following error: Nov 17 20:36:24 server.local java[28972]: This user is not allowed access to the window ...
0
votes
0answers
42 views

Launchd script's output not being logged to system.log

Sample script: #!/bin/bash echo "Hello?" ... (other things) When run via launchd, it definitely runs (the other things are being done) but nothing shows up in /var/log/system.log. I'm running OS ...
0
votes
1answer
87 views

Is it possible to stop a service through launchd if the service is started manually?

I am using launchd to start mysql on boot, it is working fine. I am able to stop and start the service using 'launchctl unload' and 'launchctl load' commands. Also I am able to start the service by ...
0
votes
1answer
116 views

Clarification on launchd plist Program and ProgramArguments usage

Can somebody please clarify how launchd's Program and ProgramArguments configuration parameters should be used? I tried to register a service which on the command line I'd start like this: $ ...
2
votes
2answers
272 views

OSX launchctl list does not find my plist

I've created the file /System/Library/LaunchDaemons/com.rundeckd.plist with this content: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" ...
1
vote
1answer
150 views

launchd PathState usage

I am trying to use PathState to start and stop a daemon on Mac OSX. It start when I create a file called /var/cache/myjob/run. However when the file is removed, the daemon doesn't stop again. How do ...
0
votes
1answer
115 views

How can I run git daemon using launchd (on demand, inited style)?

I am trying to run git daemon using launchd (on demand, inited style). But git clone git clone git://127.0.0.1/testrepo fails with Cloning into 'testrepo'... fatal: unable to connect to 127.0.0.1 ...
0
votes
1answer
72 views

Manipulating Launchd from Python?

I have a simple python script for manipulating a plist file. Once this file is updated, I'd like to have that same script unload and then load that plist file in launchd. Normally, I'd use launchctl ...
0
votes
1answer
153 views

launchd as watchdog

Can launchd on OSX (specifically Mountain Lion) be configured to work like watchdog, monitoring processes, after having launched them, to keep them alive? If so, how?
1
vote
0answers
128 views

dnsextd connection to server error

How can I correct these dnsextd errors in my system error log? dnsextd keeps starting and restarting via lanchd. Can I disable dnsextd via command line? dnsextd ConnectToServer: connect - Socket is ...
1
vote
0answers
215 views

osx 10.6 sendmail submission: Postfix launchd stops before queue is empty

A PHP script run on a localhost development machine, needs to send 53 mail messages. After having sent 37 messages, sending stops. The postfix queue is not empty yet. The remaining messages will be ...
1
vote
0answers
106 views

launchd scheduling puzzler

Here's a puzzler: I have a .plist in /Library/LaunchDaemons which is set to run at 3:01 am every day, but which does not run. However (this is the puzzling part) when it is started with launchctl ...
0
votes
2answers
96 views

OS X Server script to archive (or empty) a users mailbox every morning

I have a requirement (SpamAssassin 'training') to archive (or delete) two user's (users are junkmail and notjunkmail) inboxes at a given time every day if there is anything in them. Can anyone help ...
2
votes
2answers
213 views

How do I launch a process as a specific user at startup on OS X?

I would like to run a script as a particular user on startup (not on login). I thought a launchd LaunchDaemon would do it, but 'man launchd' says: "If you wish your service to run as a certain user, ...
5
votes
1answer
3k views

What do the numbers in launchctl list's status column mean?

launchctl has a "Status" column in the launchctl list output. The manpage or any of the related launchd manpages do not mention this column or what it means.
2
votes
6answers
2k views

Removing a process from launchd without restarting

I have a machine on which I do not want finder to run, so initially I made it unexecutable: sudo chmod -R a-x /System/Library/CoreServices/Finder.app But then realised that launchd was still trying ...
3
votes
2answers
351 views

Manually start scheduled launchd job

On our Mac OS X (10.6) Server we have setup several backup scripts that are controlled by launchd and launched at specific times. For this we have defined StartCalendarInterval and this all works very ...
1
vote
2answers
2k views

How to correctly add daemon in MacOS 10.6.6 via launchd?

I have a very simple task to accomplish: to start tomcat application server on latest MacOS as a daemon. I have performed following steps: Installed Tomcat in /Library/Tomcat/Home Validated that it ...
1
vote
1answer
1k views

How do I setup an network (port 8080) launched on-demand service with launchd

I'm trying to run a service in 'ondemand' mode, but I can't even get launchctl to register the service. $ launchctl load /Library/LaunchDaemons/org.fossil-scm.fossil.plist bind(): Permission denied ...
4
votes
1answer
512 views

How does one check whether the OS X “disabled” flag for launchd services is set?

According to the man page for launchctl (emphasis mine):    -w   Overrides the Disabled key and sets it to false. In previous versions, this option would modify the ...
0
votes
1answer
172 views

Backing up mysql databases with launchd - what's wrong?

I'm trying to setup a backup of my databases on my new mac. I've got the script created and as far as creating the launchd plist file. However, the task seems to run over and over, instead of once a ...
0
votes
2answers
184 views

which daemons are running?

Runing snow leopard, I'd like to find a way to say: "Right now, this is what's is running and this is who is running it" I've enabled process accounting and auditing, which should tell me this, but ...
34
votes
5answers
48k views

How to start/stop/restart launchd services from the command line?

How do I restart my httpd, running under Mac OS X 10.5 (Leopard), without having to use the GUI and go to System Preferences -> Sharing and unchecking/checking "Web Sharing"? I'm looking for the ...
2
votes
1answer
1k views

How do you give full access w/ chmod to multiple groups? Need to use ACL's?

First of all, thanks for reading. I've had success running a plist launchd job that is in my LaunchAgents folder. It basically calls a small shell script that chmod's a folder's permissions. I then ...
9
votes
1answer
5k views

How do I activate launchd logging on OS X?

How do I activate launchd logging on OS X 10.6? I added a new daemon that is not starting properly (status is 1). I want to debug the problem but I was not able to find launchd logs, they are not in ...
1
vote
1answer
562 views

Convention location for JAR files for a LaunchDaemon on OS X?

I'm setting up a Hudson build slave on an OS X machine. I'm using launchd to start the slave using the following plist in `/Library/LaunchDaemons/': <?xml version="1.0" encoding="UTF-8"?> ...
5
votes
3answers
239 views

What is preventing me from piping from a '600' file into mail within launchd?

In OSX 10.6 I'm running logcheck.sh via. launchd using this plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" ...
0
votes
1answer
1k views

Starting Apache 2 at boot on Mac OS X Server 10.6

Having compiled, installed and configured Apache 2.2.15 on Mac OS X Server 10.6, all went fine. The server is running fine when started manually, no configuration problems. Then i added a launchd ...
5
votes
3answers
3k views

Use an environment variable in a launchd script

I'm curious if it's possible to specify an envrionment variable in the ProgramArguments portion of a luanchd script on Mac OS X Leopard. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ...
0
votes
1answer
181 views

Launchd starts job over and over again when it is scheduled to run once per day

I'm using launchd to run a script that should run once per day. Instead it runs a number of times (like 40) until it finally stops. Here is the script: <?xml version="1.0" encoding="UTF-8"?> ...
2
votes
0answers
565 views

launchd & launchctl Aqua session type on OSX Tiger

I have a script which I can successfully schedule using on OSX Leopard as follows :- launchctl load -w -S Aqua com.floehopper.script Apparently I need the Aqua session type because the script ...
0
votes
1answer
513 views

Backing up an SVN repository on Mac OS X

I am trying to automate backing up an SVN server on my G5 running 10.5 Leopard. I already have Time Machine set up. I figured it would be best to exclude the SVN repository from Time Machine, and ...