Find the answer to your Linux question:
Results 1 to 2 of 2
I can't figure out on how to run postgreSQL on start up. I have put everything I need at rc.local (adsl-start, httpd -k start, other stuff) but the postmaster thing ...
  1. #1
    Just Joined!
    Join Date
    Aug 2003
    Posts
    9

    More on start up



    I can't figure out on how to run postgreSQL on start up. I have put everything I need at rc.local (adsl-start, httpd -k start, other stuff) but the postmaster thing doesn't work. I know that, as root, u cannot access postgres. Then I tried to put this in rc.local:

    Code:
    sudo -u postgres postmaster
    But, still, it didn't work (although it works on the command promot).
    So is there any way to do this by scripting or should I look to other places where postgreSQL is configured?

  2. #2
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    I would recommend to create a real startprogram under /etc/init.d for that program that every other applications have. But if you need a quick answer try to use..

    Code:
    su - postgres -c "postmaster"
    In /etc/rc.local... that will change user to postgres and execute postmaster as that user...i havent tried it postgres my self so i canīt say if it workes, but its worth a try.
    Regards

    Andutt

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •