starting the server at boot

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • javier garcia - CEBAS

    starting the server at boot

    Hello;

    If I add the line:
    -------------------
    su -c 'pg_ctl start -D /usr/local/pgsql/data/ -l
    /usr/local/pgsql/data/logfile' postgres
    -------------------
    to /etc/rc.d/rd.local.
    Is there a way this could work when I don't boot as root, but as a common
    user?

    (I should be able to automatically pass a password, and I don't know how)

    Thanks and regards

    Javier Garcia


    ---------------------------(end of broadcast)---------------------------
    TIP 5: Have you checked our extensive FAQ?



  • Shridhar Daithankar

    #2
    Re: starting the server at boot

    On Monday 10 November 2003 15:02, javier garcia - CEBAS wrote:[color=blue]
    > Hello;
    >
    > If I add the line:
    > -------------------
    > su -c 'pg_ctl start -D /usr/local/pgsql/data/ -l
    > /usr/local/pgsql/data/logfile' postgres
    > -------------------
    > to /etc/rc.d/rd.local.
    > Is there a way this could work when I don't boot as root, but as a common
    > user?[/color]

    rc.local script is always run as root. So it should work even if you boot/log
    in as normal user.
    [color=blue]
    > (I should be able to automatically pass a password, and I don't know how)[/color]

    Read man pages for .pgpass.

    HTH

    Shridhar


    ---------------------------(end of broadcast)---------------------------
    TIP 3: if posting/reading through Usenet, please send an appropriate
    subscribe-nomail command to majordomo@postg resql.org so that your
    message can get through to the mailing list cleanly

    Comment

    Working...