From owner-freebsd-questions Mon Mar 3 05:30:22 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id FAA29365 for questions-outgoing; Mon, 3 Mar 1997 05:30:22 -0800 (PST) Received: from mail.shlink.de (root@mail.shlink.de [194.64.6.2]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id FAA29349 for ; Mon, 3 Mar 1997 05:30:14 -0800 (PST) Received: by mail.shlink.de (Smail3.1.29.1 #3) id m0w1Xrs-000XruC; Mon, 3 Mar 97 14:33 MET Received: (from hw@localhost) by thor.shn.com (8.6.12/8.6.6) id OAA00424 for questions@freebsd.org; Mon, 3 Mar 1997 14:25:08 +0100 Date: Mon, 3 Mar 1997 14:25:08 +0100 Message-Id: <199703031325.OAA00424@thor.shn.com> From: hw@thor.shn.com (Henning Wickhorst) Subject: Starting postgres at bootup To: questions@freebsd.org Organization: Private site Reply-To: h.wickhorst@elmshorn.netsurf.de Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 ------------------------------------------------------------------