Discussion:
start and stop of single xinetd services
(too old to reply)
Mirko
2004-01-22 12:07:06 UTC
Permalink
Hello,

I have a Redhat 9 system running a firebird-database server which is
started by xinetd. For the nightly backup i want to stop the service and
restart it after copying the database folders. Whats the best way to
clean finish and restart the xinitd service for firebird ?
(The Suse-version starts and stopps firebird using a rcfirebird init
script - but i have to run it on redhat this time)

Thanks for your suggestions
Mirko
Tommy Reynolds
2004-01-22 15:02:22 UTC
Permalink
Post by Mirko
I have a Redhat 9 system running a firebird-database server which is
started by xinetd. For the nightly backup i want to stop the service and
restart it after copying the database folders. Whats the best way to
clean finish and restart the xinitd service for firebird ?
(The Suse-version starts and stopps firebird using a rcfirebird init
script - but i have to run it on redhat this time)
Xinetd services are controlled using the chkconfig(8) command. A
"chkconfig foo on" immediately starts the service, and a "chkconfig
foo off" immediately stops it. You might try:

# chkconfig xxx off
# do your backup
# chkconfig xxx on

for a first attempt.
Mirko
2004-01-22 15:25:04 UTC
Permalink
Post by Tommy Reynolds
Xinetd services are controlled using the chkconfig(8) command. A
"chkconfig foo on" immediately starts the service, and a "chkconfig
Perfect !!
Thank you !

Mirko
Jörgen Busink
2004-01-22 15:02:55 UTC
Permalink
You can't just stop a single service within xinetd, you will have to stop
xinetd completely ("service xinetd stop"). This however is probably not
what you want because all other services served by xinetd will be stopped
as well.

I think it's best that you do not make your database accessible with
xinetd but rather let it run as a daemon of its own. You will have to
write an init script of course, but that's not too hard (get an existing
init script from /etc/rc.d/init.d and modify it to suit firebird). If you
need any help with that, post a followup to this thread.

Greets,
Post by Mirko
Hello,
I have a Redhat 9 system running a firebird-database server which is
started by xinetd. For the nightly backup i want to stop the service and
restart it after copying the database folders. Whats the best way to
clean finish and restart the xinitd service for firebird ?
(The Suse-version starts and stopps firebird using a rcfirebird init
script - but i have to run it on redhat this time)
Thanks for your suggestions
Mirko
unknown
2004-01-25 06:27:53 UTC
Permalink
Post by Mirko
I have a Redhat 9 system running a firebird-database server which is
started by xinetd. For the nightly backup i want to stop the service
and restart it after copying the database folders. Whats the best way
to clean finish and restart the xinitd service for firebird ?
You probably want to have 2 xinetd configuration files for the firebird service, with the appropriate line "disable = yes" or
"disable = no".

Then place the file you need and restart xinetd:

To shutdown the service, modify your nightly backup script, simplisticly e.g.:

cp /etc/firebird_off /etc/xinetd.d/firebird
kill -HUP `cat /var/run/xinetd.pid`
# do the backup, then ...

cp /etc/firebird_on /etc/xinetd.d/firebird
kill -HUP `cat /var/run/xinetd.pid`



tony

--
use hotmail for any email replies



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
unknown
2004-01-25 06:41:47 UTC
Permalink
Post by unknown
cp /etc/firebird_off /etc/xinetd.d/firebird
kill -HUP `cat /var/run/xinetd.pid`
# do the backup, then ...
cp /etc/firebird_on /etc/xinetd.d/firebird
kill -HUP `cat /var/run/xinetd.pid`
Sorry, better would be "/sbin/chkconfig firebird off" and subsequently "/sbin/chkconfig firebird on" although the effect would be
the same if someone was actually connected to the service when the connection was terminated.

It may leave your database in a corrupt state, which you would then backup?

--
use hotmail for any email replies



-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----

Loading...