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.
0
votes
0answers
22 views
launchd allowed me to source my .bash_profile and run rvm but now after an os x upgrade this is broken
In the past (March 2013) I was able to run this plist file and source my .bash_profile to get rvm to load as a function and pull in my default ruby 1.9.3 but now the process just uses the system ruby ...
0
votes
1answer
12 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
50 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
0answers
33 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
70 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?
0
votes
0answers
127 views
Source of launchd job: org.postgresql.postgres [closed]
Edit: see comment for answer.
I have an interesting question.
On my OS X 10.8 server postgres is running fine.
Launchd has is loaded under the label 'org.postgresql.postgres' and '# launchctl list ...
1
vote
0answers
54 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 ...
0
votes
0answers
53 views
Guidelines for migrating from launchd to init.d
I have a set of startup scripts written for Mac OS X Tiger as launchd-scripts. I need to migrate them to a Debian ("squeeze") server. If I understand correctly then for Debian I would have to rewrite ...
1
vote
0answers
176 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
83 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
85 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
117 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, ...
3
votes
1answer
1k 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
267 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
1k 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 ...
0
votes
1answer
713 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
...
3
votes
1answer
269 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
147 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
182 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 ...
25
votes
4answers
27k 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
977 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 ...
7
votes
1answer
3k 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
503 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
224 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
2k 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
165 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"?>
...
1
vote
0answers
487 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
440 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 ...