startup and shutdown scripts

in Genius Bar edited January 2014
How do I set up POSTGRESQL to startup and shutdown along with the computer? I don't want to tie it down to a user's logon scripts. I was trying to find /etc/rc.init or something on those lines. What scripts do I need to modify?


  • Reply 1 of 3
    dobbydobby Posts: 797member
    Add the script to /Library/StartupItems (note spelling).

    If the dir doesn't exist then create it.

    DO NOT use /System/Library/StartupItems as an upgrade replaces the contents, this dir is for OS X only.


    Now create a dir with the name of the startup item ie


    and have the script mount_network_dirs in this dir.

    The site had a good article on OS X startup items. Can't find the link tho. Sorry.

  • Reply 2 of 3
    Thanks a lot, Dobby.

    The link with the details can be found here.

    and OS-X still doesn't know how to handle shutdown gracefully without someone tapping into Apple Events or using a GUI. That is so lame, how do you expect graceful shutdown of servers without manual intervention?
  • Reply 3 of 3
    dobbydobby Posts: 797member
    A gracefull shutdown can be done by useing the reboot command. If yoy have a file server you might want to sync the filesystem before the reboot.

Sign In or Register to comment.