On Sun, 29 Mar 1998, SC Altex Impex SRL wrote:
>I'm trying to start/stop the postgres database manager with a SysV init
>script (RH4.2).
>
>The script (following under - line numbers not included into original)...

Please don't include line numbers in the future.  They make reading the
script difficult.

>correctly starts postgres on runlevel 3 but it won't execute in order
>to stop it on runlevel 0 and/or 6. The symlinks in /etc/rc.d/rc0.d and
>/etc/rc.d/rc6.d are correct but it just won't execute.  If I replace
>the rc0.d/rc6.d symlinks with pre-existing ones (like gpm), well,
>now the gpm-symlink-to-postgres.init stops the DB manager correctly.
>This gives me the ideea that those symlinks should be 'registered'
>to some file/service/daemon.  But I don't know where and/or how.

Please provide the output of the following command:

    ls -l /etc/rc.d/{rc[036].d/[SK]??,init.d/}*postgres*

[...]
>PS: And by the way, given the line 42
>su - ${PGACCOUNT} -c "(${POSTMASTER} ${PGOPTS} >& logger -p ${FACILITY}.notice) &" >& 
>/dev/null&
>
>how do I convert it from tcsh (which I know nothing about) to bash
>(which I know very little about) ?

Change to:

su - ${PGACCOUNT} -c "(${POSTMASTER} ${PGOPTS} 2>&1 | logger -p ${FACILITY}.notice) &" 
> /dev/null 2>&1 &

>And even more
>
>su - ${PGACCOUNT} -c "(${POSTMASTER} ${PGOPTS}) &" >& /baza/postgres.session&
>cat /baza/postgres.start > /baza/postgres.session
>/sbin/clock -r >> /baza/postgres.session

Change to:

su - ${PGACCOUNT} -c "(${POSTMASTER} ${PGOPTS}) &" > /baza/postgres.session 2>&1 &
cat /baza/postgres.start >| /baza/postgres.session
/sbin/clock -r >> /baza/postgres.session

-- 
    Steve Coile
 [EMAIL PROTECTED]


-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with 
                       "unsubscribe" as the Subject.

Reply via email to