Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-20 Thread Matthieu Herrb
On 9/21/07, Siju George <[EMAIL PROTECTED]> wrote: > I have a similar doubt. > What happens when I have a lot of windows open in my fvwm2 and I click > on my desktop and click "Exit Fvwm2" ? > > Will all the X11 applications be shutdown decently? > Or is it better to type "halt" in an xterm? > Wha

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-20 Thread Siju George
On 9/19/07, Stuart Henderson <[EMAIL PROTECTED]> wrote: > On 2007/09/19 14:48, Tomas wrote: > > Watching the thread about startup script I thought of a question about > > shutdown script. Is it necessary to shutdown certain services when machine > > goes down? Like for example mysql, dovecot, clama

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Tony Abernethy
Stuart Henderson wrote: > > On 2007/09/19 16:28, Tomas wrote: > > That's an excelent idea. I will use 'pkill mysqld'. But instead > > of 'sleep 10' myabe it's better to check every second if mysqld.sock > > exists? > > I would choose to limit the maximum time, in case mysqld deadlocks. > > I t

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Lars Noodén
Lars Hansson wrote: > On 9/19/07, Lars Noodin <[EMAIL PROTECTED]> wrote: >> By what method is shutdown then forced to wait until said processes have >> cleaned up? > > None. rc.shutdown is for those processes with slow/important shutdown > that needs waiting for. Ok. So then rc.shutdown should b

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Lars Hansson
On 9/19/07, Lars Noodin <[EMAIL PROTECTED]> wrote: > By what method is shutdown then forced to wait until said processes have > cleaned up? None. rc.shutdown is for those processes with slow/important shutdown that needs waiting for. --- Lars Hansson

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Stuart Henderson
On 2007/09/19 16:28, Tomas wrote: > That's an excelent idea. I will use 'pkill mysqld'. But instead > of 'sleep 10' myabe it's better to check every second if mysqld.sock > exists? I would choose to limit the maximum time, in case mysqld deadlocks. I think "pgrep mysqld" is a safer test than my

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Lars Noodén
Henning Brauer wrote: > any software which requires special shutdown handling ist busted. Sounds fair. > all processes get a SIGTERM on shutdown. the ones that need to do > cleanup before they exit need to install a signal handler for that (and > in general they do). Pardon the ignorant questi

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Tomas
Stuart Henderson wrote: On 2007/09/19 14:48, Tomas wrote: Watching the thread about startup script I thought of a question about shutdown script. Is it necessary to shutdown certain services when machine goes down? Like for example mysql, dovecot, clamav, amavis or openvpn. I've

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Tomas
Thanks, I will start using rc.shutdown more often :) Craig Skinner wrote: Tomas wrote: Hi list, Watching the thread about startup script I thought of a question about shutdown script. Is it necessary to shutdown certain services when machine goes down? Like for example mysql, dovecot, clamav

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Tomas
And can I ask how do you do it? Because I don't want to write my mysql password in rc.shutdown script. Lars Hansson wrote: On 9/19/07, Tomas <[EMAIL PROTECTED]> wrote: Is it necessary to shutdown certain services when machine goes down? Very few, I'd wager. The only ones I both

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Tomas
Yes it's obvious :) But I've got a little bit confused because I've seen very few using it. But that's already my problem, isn't it? :) Thanks :) Artur Litwinowicz wrote: Hi, yes, You are right - proper shutdown is important. This functionality realizes script /etc/rc.shutdown fired dur

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Mike Erdely
On Wed, Sep 19, 2007 at 04:25:49PM +0300, Tomas wrote: > And can I ask how do you do it? Because I don't want to write my mysql > password in rc.shutdown script. Try: /usr/local/share/mysql/mysql.server stop

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Tomas
Yes, it should have, but it haven't :) So I've got wondering :) Julian Leyh wrote: On 14:48 Wed 19 Sep , Tomas wrote: Hi list, Watching the thread about startup script I thought of a question about shutdown script. Is it necessary to shutdown certain services when machin

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Tomas
That's a good practice. There's no doubt about it. But like I said I've seen very few people using it, in fact I saw it only once, shuting down amavisd-new. But I don't think that's an error or oversight, that's our ignorance :) And don't want to be ignorant :) So I've asked the question :)

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Henning Brauer
* Tomas <[EMAIL PROTECTED]> [2007-09-19 14:02]: > Watching the thread about startup script I thought of a question about > shutdown script. Is it necessary to shutdown certain services when machine > goes down? Like for example mysql, dovecot, clamav, amavis or openvpn. I've > never saw anybody

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Craig Skinner
Tomas wrote: And can I ask how do you do it? Because I don't want to write my mysql password in rc.shutdown script. Write a script /root/sbin/mysql-shutdown.sh with whatever you need in it, & call that script from /etc/rc.shutdown Only root can read it. Or: /usr/local/site/sbin/mysql-shu

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Craig Skinner
Tomas wrote: Hi list, Watching the thread about startup script I thought of a question about shutdown script. Is it necessary to shutdown certain services when machine goes down? Like for example mysql, dovecot, clamav, amavis or openvpn. I've never saw anybody do that. Lots of people on thei

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Tomas
Probably most of the programs does handle SIGTERM appropriately, but it may be too little time for a program to clean itself before it receives SIGKILL signal. For an example mysql. It needs to kill any connections to it (and if any problem killing it, it should wait for some time and then try agai

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Przemyslaw Nowaczyk
On Wed, Sep 19, 2007 at 03:16:50PM +0300, Lars Nood??n wrote: > Tomas wrote: > > Watching the thread about startup script I thought of a question about > > shutdown script. Is it necessary to shutdown certain services when > > machine goes down? Like for example mysql, dovecot, clamav, amavis or >

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Julian Leyh
On 14:48 Wed 19 Sep , Tomas wrote: > Hi list, > > Watching the thread about startup script I thought of a question about > shutdown script. Is it necessary to shutdown certain services when machine > goes down? Like for example mysql, dovecot, clamav, amavis or openvpn. I've > never saw anyb

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Hannah Schroeter
Hi! On Wed, Sep 19, 2007 at 02:48:54PM +0300, Tomas wrote: >Watching the thread about startup script I thought of a question about >shutdown script. Is it necessary to shutdown certain services when >machine goes down? Like for example mysql, dovecot, clamav, amavis or >openvpn. I've never saw

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Lars Noodén
Tomas wrote: > Watching the thread about startup script I thought of a question about > shutdown script. Is it necessary to shutdown certain services when > machine goes down? Like for example mysql, dovecot, clamav, amavis or > openvpn. I myself can't say if it's necessary, but it is probably goo

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Stuart Henderson
On 2007/09/19 14:48, Tomas wrote: > Watching the thread about startup script I thought of a question about > shutdown script. Is it necessary to shutdown certain services when machine > goes down? Like for example mysql, dovecot, clamav, amavis or openvpn. I've > never saw anybody do that. For

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Artur Litwinowicz
Hi, yes, You are right - proper shutdown is important. This functionality realizes script /etc/rc.shutdown fired during shutdown. I that place should be commands for all services which require shutdown command. I hope it is what You looking for ;) (sorry if it is to obvious true for You).

Re: Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Lars Hansson
On 9/19/07, Tomas <[EMAIL PROTECTED]> wrote: > Is it necessary to shutdown certain services when > machine goes down? Very few, I'd wager. The only ones I bother with doing it for are postgresql and mysql since it can take them a while to shut down correctly and it can get messy if they're not. -

Shutdown script (derived from "Simple startup daemon's on boot question?")

2007-09-19 Thread Tomas
Hi list, Watching the thread about startup script I thought of a question about shutdown script. Is it necessary to shutdown certain services when machine goes down? Like for example mysql, dovecot, clamav, amavis or openvpn. I've never saw anybody do that. Lots of people on their manuals, tu

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Jake Conk
(JTS) <[EMAIL PROTECTED]> wrote: > > -Original Message- > > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > > On Behalf Of Jake Conk > > Sent: Tuesday, 18 September 2007 6:36 PM > > To: misc@openbsd.org > > Subject: Simple startup daemon's

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Stuart Henderson
On 2007/09/19 07:11, Edwards, David (JTS) wrote: > Introducing fresh admin staff to BSD is a lot easier > if they don't have to do the "grep for PID" > "kill -TERM PID" thing to stop a running "service". pkill is good for that. unlike some OS, you don't get trained to use a command (killall) whic

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Edwards, David (JTS)
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > On Behalf Of Jake Conk > Sent: Tuesday, 18 September 2007 6:36 PM > To: misc@openbsd.org > Subject: Simple startup daemon's on boot question? > > Hello, > > Simple noob question..

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Julian Leyh
On 03:25 Tue 18 Sep , Jake Conk wrote: > What do you mean that you put OpenVPN into your hostname.if? Can your > hostname.if file contain sh script code? If so is that true also with > something like hostname.fxp0? My hostname.ral0: inet 10.10.1.1 255.255.255.0 NONE media autoselect mediaopt

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Gilles Chehade
On Tue, Sep 18, 2007 at 03:25:56AM -0700, Jake Conk wrote: > Julian, > > What do you mean that you put OpenVPN into your hostname.if? Can your > hostname.if file contain sh script code? If so is that true also with > something like hostname.fxp0? > This is from hostname.if(5) !command-

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Craig Skinner
Jake Conk wrote: Julian, What do you mean that you put OpenVPN into your hostname.if? Can your hostname.if file contain sh script code? $ man hostname.if See the section on !command-line Also, what do you mean by use ps? $ man ps

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Jake Conk
Julian, What do you mean that you put OpenVPN into your hostname.if? Can your hostname.if file contain sh script code? If so is that true also with something like hostname.fxp0? Also, what do you mean by use ps? Thanks, - Jake On 9/18/07, Julian Leyh <[EMAIL PROTECTED]> wrote: > On 02:05 Tue 1

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Julian Leyh
On 02:05 Tue 18 Sep , Jake Conk wrote: > Hello, > > Simple noob question... I've installed a few packages (ie nrpe2 and > openvpn) that on other systems like Linux and even BSD based systems > such as FreeBSD provide means of a rc script which can start and stop > the service and you can confi

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Stuart Henderson
On 2007/09/18 02:05, Jake Conk wrote: > After installing these packages on OpenBSD I've listed the package > contents and don't notice any equivalent files that would do this. Are > we supposed to write our own startup scripts and place them in > /etc/rc.local to be executed when the system boots?

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Craig Skinner
Jake Conk wrote: After installing these packages on OpenBSD I've listed the package contents and don't notice any equivalent files that would do this. Are we supposed to write our own startup scripts and place them in /etc/rc.local to be executed when the system boots? Does OpenBSD not use rc sc

Re: Simple startup daemon's on boot question?

2007-09-18 Thread Lars Hansson
On 9/18/07, Jake Conk <[EMAIL PROTECTED]> wrote: > Are we supposed to write our own startup scripts and place them in > /etc/rc.local to be executed when the system boots? Yes. > Does OpenBSD not use rc scripts that start/stop/restart/ and > status applications? No but you can install something

Simple startup daemon's on boot question?

2007-09-18 Thread Jake Conk
Hello, Simple noob question... I've installed a few packages (ie nrpe2 and openvpn) that on other systems like Linux and even BSD based systems such as FreeBSD provide means of a rc script which can start and stop the service and you can configure this script to be executed on boot. After install