View previous topic :: View next topic |
Should all Gentoo init scripts have a 'reload' function to re-read the daemon's configuration without interupting the service? |
Yes! |
|
100% |
[ 20 ] |
No! |
|
0% |
[ 0 ] |
I don't need this. |
|
0% |
[ 0 ] |
|
Total Votes : 20 |
|
Author |
Message |
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Mon Apr 25, 2005 3:29 pm Post subject: 'Reload' function for init scripts |
|
|
One thing I'm *really* missing in Gentoo is this nice 'reload' function that (almost) all Debian init scripts have. I have two servers, one Gentoo and one Debian, and it's really nice if I can just start '/etc/init.d/apache2 reload' or '/etc/init.d/jabber reload' to re-read the config file instead of having to do this manually. I know I can do this by sending SIGHUB to the daemon, but it doesn't work for all daemons and it's way easier to do this via an init script. Also, the 'restart' function has the same effect, but it stops and starts the daemon, which is really not very nice if you do this with sshd on a remote machine, like it happened to me once
I think it should not be much of a problem to add such a function to all the init scripts for the daemons that support it. This is somethng I'm really missing, so I'm voting for inclusion into the Gentoo baselayout!!
Tom |
|
Back to top |
|
|
spb Retired Dev
Joined: 02 Jan 2004 Posts: 2135 Location: Cambridge, UK
|
Posted: Mon Apr 25, 2005 3:32 pm Post subject: |
|
|
Sounds like something that could be implemented .... file a bug at https://bugs.gentoo.org if you want to see it. |
|
Back to top |
|
|
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Tue Apr 26, 2005 11:55 pm Post subject: |
|
|
Well I filed a bug report for this, I already got an answer that wasn't too positive, I was told that such a thing would be the decision of every single package maintainer. I hoped someone could make this a common suggestion/guideline for init scripts
Tom |
|
Back to top |
|
|
ssbilly5 n00b
Joined: 01 Sep 2002 Posts: 46 Location: USA
|
Posted: Wed Apr 27, 2005 4:22 am Post subject: |
|
|
I've always used
Code: | /etc/init.d/apache2 restart |
Does this not do what you're asking? I believe it also works for almost every other script in init.d as well.
Maybe I'm missing something, but I hope this helps
John |
|
Back to top |
|
|
zxiiro Tux's lil' helper
Joined: 27 Apr 2004 Posts: 98 Location: Ottawa
|
Posted: Wed Apr 27, 2005 4:32 am Post subject: |
|
|
ssbilly5 wrote: | I've always used
Code: | /etc/init.d/apache2 restart |
Does this not do what you're asking? I believe it also works for almost every other script in init.d as well.
Maybe I'm missing something, but I hope this helps
John |
actually that stops the service and turns it back on. the idea is to do this without stopping the service. |
|
Back to top |
|
|
gentoo_lan l33t
Joined: 08 Sep 2004 Posts: 891 Location: Charles Town, WV
|
Posted: Wed Apr 27, 2005 6:28 am Post subject: |
|
|
elektrohirn wrote: | Well I filed a bug report for this, I already got an answer that wasn't too positive, I was told that such a thing would be the decision of every single package maintainer. I hoped someone could make this a common suggestion/guideline for init scripts
Tom |
What is the bug number? |
|
Back to top |
|
|
nevynxxx Veteran
Joined: 12 Nov 2003 Posts: 1123 Location: Manchester - UK
|
Posted: Wed Apr 27, 2005 6:40 am Post subject: |
|
|
elektrohirn wrote: | Well I filed a bug report for this, I already got an answer that wasn't too positive, I was told that such a thing would be the decision of every single package maintainer. I hoped someone could make this a common suggestion/guideline for init scripts
Tom |
Well it would, it would be a big job to go through all the packages that create init scripts and change them, but the package maintainers can do it easily.
There isn't really any sane way of forcing them to adopt this, but it would be a good thing for them to do. If they feel kind. _________________ My Public Key
Wanted: Instructor in the art of Bowyery |
|
Back to top |
|
|
castorilo Apprentice
Joined: 25 Dec 2002 Posts: 157
|
Posted: Wed Apr 27, 2005 1:09 pm Post subject: |
|
|
I must be missing something. This works perfectly for me and I have been using it for a while:
Code: |
# cd /etc/init.d
init.d # ./apache2 reload
* Reloading apache2... [ ok ]
|
and if you take a look at the apache2 script, you can see the reload function does a graceful restart (apache's way to do what you describe).
Every package does a reload a little different. Some do a SIGHUP, others (like apache) do a -graceful, and some don't do it. There is no way to do a generic way for everyone, fortunatelly, most common daemons have it. |
|
Back to top |
|
|
|