1 |
Hi all, |
2 |
|
3 |
Well you're certainly right, Dirk, that one launchd plist for all of |
4 |
Gentoo would be easier than distributing a plist per daemon and |
5 |
worrying about where to put it. We'd lose some of the functionality of |
6 |
launchd, but it's probably a win for non-Darwin prefix users if we |
7 |
work on maintaining init.d scripts. |
8 |
|
9 |
Is the problem with the runlevel not getting reset to do with your |
10 |
launchagent being fire-and-forget, with no reboot-time hook? |
11 |
|
12 |
Perhaps we could write a small application to stay resident and |
13 |
respond to launchd, shutting daemons down cleanly on reboot. |
14 |
|
15 |
Peter |
16 |
|
17 |
On Tue, Apr 28, 2009 at 6:03 AM, zAfi <nietonfir@×××××.com> wrote: |
18 |
> Well, I like the idea as well, especially what Dirk suggested as this |
19 |
> would fit very well in the whole prefix approach and wouldn't require |
20 |
> that much patches imho. ;) |
21 |
> |
22 |
> For your mysqld autostartup, simply create a com.mysql.mysqld.plist |
23 |
> file at /Library/LaunchDaemons with the following content (change to |
24 |
> your needs): |
25 |
> <?xml version="1.0" encoding="UTF-8"?> |
26 |
> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" |
27 |
> "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> |
28 |
> <plist version="1.0"> |
29 |
> <dict> |
30 |
> <key>GroupName</key> |
31 |
> <string>mysql</string> |
32 |
> <key>KeepAlive</key> |
33 |
> <true/> |
34 |
> <key>Label</key> |
35 |
> <string>com.mysql.mysqld</string> |
36 |
> <key>Program</key> |
37 |
> <string>/Users/*/Gentoo/usr/bin/mysqld_safe</string> |
38 |
> <key>UserName</key> |
39 |
> <string>*USERNAME_here_under_which_the_process_should_run*</string> |
40 |
> </dict> |
41 |
> </plist> |
42 |
> |
43 |
> chmod 644 and chown root:wheel |
44 |
> Kudos to macports... |
45 |
> |
46 |
> Another way would be to drop mysqld_safe into your autostart objects |
47 |
> in your system preferences... |
48 |
> |
49 |
> bye |
50 |
> |
51 |
> 2009/4/28 Alexander Kellett <a@×××××××.net>: |
52 |
>> sorry for the lame contentless reply... hope positive feedback is welcome. |
53 |
>> |
54 |
>> i like this idea specifically a lot, and in general the addition of |
55 |
>> start scripts (currently i'm just starting mysqld on the command line |
56 |
>> each time i reset my mac, which is quite frustrating). |
57 |
>> |
58 |
>> launchd is very blackboxish to me, while i know gentoo start up |
59 |
>> scripts well. maybe a hybrid approach could be found without too much |
60 |
>> code dup that is ideal for either? |
61 |
> |
62 |
> |