having programs launch on reboot

Ryan Schmidt ryandesign at macports.org
Mon Dec 19 21:07:45 PST 2011


I don't know why you're having problems. The plists should work fine out of the box. You don't need to edit the files at all.


On Dec 19, 2011, at 16:53, Puneet Kishor wrote:

> First, I manually edited each plist so the "Disabled" key was now set to "false".

There should be no need to change that.


> Then I tried to unload apache2.plist, but that failed, perhaps because Apache was running (although, that is what I though unload was supposed to do... stop Apache and unload the plist). Anyway, I stopped Apache and then unloaded and loaded the plist, and that started Apache just fine.

So no problem there.


> For Postgres, I not only edited the plist as above, but since the plist really calls `/opt/local/etc/LaunchDaemons/org.macports.postgresql90-server/postgresql90-server.wrapper`, I edited that wrapper to make sure that had the right values for database and log locations (my database and logs are in non-traditional places).

I am not familiar with Postgres, but for MySQL, you do not need to edit the wrapper to tell it where to store its databases; you just edit the MySQL config file, my.cnf. I would hope Postgres would offer you a similar facility.


> Unloaded and reloaded the postgres plist, and that worked fine as well.

OK.


> I have not had the same success with mysql5. Briefly, if I start mysql with `mysqld_safe`, it works fine.

Which "mysqld_safe" are you running? /opt/local/lib/mysql5/bin/mysqld_safe? /opt/local/bin/mysqld_safe5 (this is a symlink to the former)? Or something else?


> But, if I unload and reload the mysql plist, which, in turn, calls `/opt/local/etc/LaunchDaemons/org.macports.mysql5/mysql5.wrapper`, the server doesn't start. As far as I can tell, I see no errors in the log.

Which logs are you looking at? Check the Console, the system.log, and also the MySQL log, which would normally be in /opt/local/var/log/mysql5 but I believe you can change its name and location in my.cnf, so if you have, then only you know where it is.




More information about the macports-users mailing list