startup and shutdown scripts

Jump to First Reply
Posted:
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?

Comments

  • 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.

    (Edit)

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

    /Library/StartupItems/mount_network_dirs

    and have the script mount_network_dirs in this dir.



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



    Dobby.
     0Likes 0Dislikes 0Informatives
  • 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?
     0Likes 0Dislikes 0Informatives
  • 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.



    Dobby.
     0Likes 0Dislikes 0Informatives
Sign In or Register to comment.