Date: Mon, 3 Mar 1997 14:25:08 +0100 From: hw@thor.shn.com (Henning Wickhorst) To: questions@freebsd.org Subject: Starting postgres at bootup Message-ID: <199703031325.OAA00424@thor.shn.com>
next in thread | raw e-mail | index | archive | help
Hi, I' m running postgresql V6.0 on a FreeBSD Box (V2.1.0-R). But i found no way to start the postmaster while booting. The postmaster daemon has to run under uid 'postgres'. I put this line into the 'rc.local' file : /bin/echo "/u/pgsql/bin/postmaster -D/u/pgsql/data > \ /u/pgsql/server.log 2>&1 &" | /usr/bin/su - postgres But the postmaster dies with signal 11 at bootup. >From /var/log/messages: Mar 1 15:48:15 thor /kernel: pid 1110: su: uid 270: exited on signal 11 270 is the uid of user postgres. When i put the same line into a script file and call this script file as root everything works fine. The postmaster is running as a daemon under uid 'postgres'. When i call this script file from 'rc.local' while booting, postmaster dies with signal 11. When i try to start the script file using 'at', it fails on the same reason like starting it from rc.local. I also tried to call postmaster with option '-S' from 'rc.local' but postmaster also dies. I don't think that this is a postgres problem, while starting other programs from rc.local using su gave the same problems. I tried that with 'ingreslock' using 'su' to run it under uid ingres. How do you start daemons, who have to run under a special uid while bootup ? Regards, Henning -- ------------------------------------------------------------------ Henning Wickhorst Elmshorn, Germany E-Mail: h.wickhorst@elmshorn.netsurf.de ------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703031325.OAA00424>