Questions tagged [launchctl]
A utility used on OS X to manage the launchd daemon/agent manager
20
questions
0
votes
0
answers
8
views
Launchd logging to system logs
I am currently doing something like this
<key>StandardOutPath</key>
<string>/var/log/s.log</string>
<key>StandardErrorPath</key>
<string>/var/log/e.log</...
7
votes
2
answers
2k
views
How do I limit launchd log size on OS X?
As this answer suggested, I activated logging of a .plist file I have generated.
<key>StandardOutPath</key>
<string>/path/to/logfile.log</string>
<key>StandardErrorPath&...
1
vote
1
answer
974
views
How to restart a launchd service automatically if it exits with 78 exit code
I am loading a c binary using launchd service. It should be relaoded every time when system restarts. Below is my plist file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-/...
5
votes
3
answers
10k
views
Starting Redis as a service on OS X with Homebrew
I installed Redis via brew install redis and attempted to add it as a service via:
ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
launchctl load ~/Library/LaunchAgents/homebrew.mxcl....
3
votes
0
answers
1k
views
MAC OS X Server, process keep respawning after unloaded from launchd
I am constantly getting the following messages in system log:
com.apple.launchd.peruser.0 (homebrew.mxcl.memcached[PID]) Exited with code : 64 com.apple.launchd.peruser.0 (homebrew.mxcl.memcached)
...
1
vote
1
answer
147
views
Run a script via .plist on login as if in a specific directory
My .plist file calls a shell script but the script fails because it references other files in the same directory as the script.
Thus the script only runs successfully when I 'cd' to the correct ...
0
votes
1
answer
5k
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 /Users/dmitry/Library/LaunchAgents/...
0
votes
1
answer
1k
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 ...
2
votes
2
answers
5k
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" ...
12
votes
1
answer
2k
views
Difference between ulimit, launchctl, sysctl?
When managing the limits of the operating system (specifically OSX), what is the difference and overlap between the functionality and history of these three tools:
ulimit
launchctl, launchd
sysctl
I ...
1
vote
1
answer
1k
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
1
answer
331
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 ...
20
votes
1
answer
22k
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.
3
votes
6
answers
8k
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 ...
12
votes
3
answers
7k
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
0
answers
444
views
crontabs not firing on mac osx server under a non root account
I'd like to run a crontab but it is never fired. It's on a mac osx server 10.5.6
Accounts on mac are not defined in /etc/passwd. So their is no use in adding my account in /usr/lib/cron/cron.allow. I ...
2
votes
1
answer
330
views
launchctl slow on ssh to OS X server
I'm running an OS X 10.5.8 server. When my users ssh into it, it can take up to about 10 seconds before they see a prompt.
I've turned on debug for ssh and see it's pausing at the "Entering ...
51
votes
3
answers
52k
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 ...
2
votes
1
answer
567
views
OSX problem starting FTP from preferences
When I try to enable the FTP service in the preferences (File Sharing->Options->Share Files and Folders Using FTP) the check box enables and then disables again. The console is giving me the message :...
1
vote
1
answer
5k
views
(OS X 10.6) ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
I have recently installed Snow Leopard onto my Mac, and MySQL stopped working. I went into the terminal and used 'rm -r' on my old directory, and redownloaded the new version from the mysql website. ...