supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
* Run scripts
@ 2008-07-04 15:22 Gilles Sadowski
  2008-07-04 15:28 ` Mike Buland
  0 siblings, 1 reply; 6+ messages in thread
From: Gilles Sadowski @ 2008-07-04 15:22 UTC (permalink / raw)
  To: supervision

Hello.

Does anyone have a run script for "postgresql"?

The script at
  http://smarden.org/runit/runscripts.html
is quite outdated.

Best,
Gilles


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Run scripts
  2008-07-04 15:22 Run scripts Gilles Sadowski
@ 2008-07-04 15:28 ` Mike Buland
  2008-07-04 16:38   ` Gilles Sadowski
  0 siblings, 1 reply; 6+ messages in thread
From: Mike Buland @ 2008-07-04 15:28 UTC (permalink / raw)
  To: supervision

Sure, I haven't looked at the one online, but I use this:

#!/bin/bash

exec chpst -u postgres /usr/bin/postmaster \
   -D /srv/pgsql/data 2>&1

Works pretty well, you should change /srv/pgsql/data to whatever the path to 
your cluster is, and of course, use whatever your postgres user is.

--Mike

On Friday 04 July 2008 09:22:32 am Gilles Sadowski wrote:
> Hello.
>
> Does anyone have a run script for "postgresql"?
>
> The script at
>   http://smarden.org/runit/runscripts.html
> is quite outdated.
>
> Best,
> Gilles



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Run scripts
  2008-07-04 15:28 ` Mike Buland
@ 2008-07-04 16:38   ` Gilles Sadowski
  0 siblings, 0 replies; 6+ messages in thread
From: Gilles Sadowski @ 2008-07-04 16:38 UTC (permalink / raw)
  To: supervision

Hi.

> exec chpst -u postgres /usr/bin/postmaster \
>    -D /srv/pgsql/data 2>&1
> 
> Works pretty well, you should change /srv/pgsql/data to whatever the path to 
> your cluster is, and of course, use whatever your postgres user is.

Well, I've just installed postgresql 8.3 and I was fairly lost because I was
expected more automatic configuration to take place (I use Debian).
As far as I can tell, the install just created an empty /var/lib/postgresql
directory.  In the end browsing through the documentation on the
postgresql web site, I tried "initdb". And there it was.
The second thing is that all the programs (like "postmaster") are not in
/usr/bin but in /usr/lib/postgresql/<version>/bin.  Again that's not
indicated in the Debian readme file.
But the usual startup script (in /etc/init.d) is quite complex, so I guess
that for "normal" people, it might have performed everything necessary (?)
at first launch.

Anyways, now it runs ;-)

Thanks,
Gilles


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: run scripts
  2005-10-18  0:22 ` Charlie Brady
@ 2005-10-18  9:27   ` TheOldFellow
  0 siblings, 0 replies; 6+ messages in thread
From: TheOldFellow @ 2005-10-18  9:27 UTC (permalink / raw)


Charlie Brady wrote:
> 
> On Thu, 6 Oct 2005, Daniel Zilli wrote:
> 
>> I'm start working with runit and found it great. I would like to
<snip>
> What's also important is that the TERM signal will actually cause the
> process to shut down. A few badly behaved programs don't do that - mysql
> in particular.

But you can use a finish script to kill them (or send them their correct
shutdown signals).  I find that I need to do that for the nfsd threads
after stopping mountd (with rpc.nfsd -- 0).

> It's common practice to have programs log to stderr rather than via syslog.

Unless you use socklog (recommended).

R.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: run scripts
  2005-10-06 20:55 run scripts Daniel Zilli
@ 2005-10-18  0:22 ` Charlie Brady
  2005-10-18  9:27   ` TheOldFellow
  0 siblings, 1 reply; 6+ messages in thread
From: Charlie Brady @ 2005-10-18  0:22 UTC (permalink / raw)
  Cc: supervision


On Thu, 6 Oct 2005, Daniel Zilli wrote:

> I'm start working with runit and found it great. I would like to migrate 
> all my rc.d scripts (slackware 10.2) to runit scheme. Some scripts are 
> easy other hard to migrate. I would like some advise. What do I need 
> consider when writing runit scripts ?

What's critically important is that the program must keep running, and 
must not "put itself into the background" or "daemonize itself".

What's also important is that the TERM signal will actually cause the 
process to shut down. A few badly behaved programs don't do that - mysql 
in particular.

It's common practice to have programs log to stderr rather than via 
syslog.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* run scripts
@ 2005-10-06 20:55 Daniel Zilli
  2005-10-18  0:22 ` Charlie Brady
  0 siblings, 1 reply; 6+ messages in thread
From: Daniel Zilli @ 2005-10-06 20:55 UTC (permalink / raw)


Hi!

I'm start working with runit and found it great. I would like to migrate 
all my rc.d scripts (slackware 10.2) to runit scheme. Some scripts are
easy other hard to migrate. I would like some advise. What do I need 
consider when writing runit scripts ?

Bests,
Daniel Zilli


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-07-04 16:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-04 15:22 Run scripts Gilles Sadowski
2008-07-04 15:28 ` Mike Buland
2008-07-04 16:38   ` Gilles Sadowski
  -- strict thread matches above, loose matches on Subject: below --
2005-10-06 20:55 run scripts Daniel Zilli
2005-10-18  0:22 ` Charlie Brady
2005-10-18  9:27   ` TheOldFellow

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).