diff --git a/trunk/ripnews/CHANGELOG b/trunk/ripnews/CHANGELOG index 45b28c6..3f45bf6 100644 --- a/trunk/ripnews/CHANGELOG +++ b/trunk/ripnews/CHANGELOG @@ -1,4 +1,4 @@ -# $Dwarf: CHANGELOG,v 1.24 2003/06/15 22:28:28 ward Exp $ +# $Dwarf: CHANGELOG,v 1.25 2003/06/16 10:56:11 ward Exp $ # $Source$ from 0.2.1 to 0.2.2 @@ -9,6 +9,7 @@ from 0.2.1 to 0.2.2 - fetch subjects sorted so you get a better chance at getting full series - now your TEMPDIR can be on another drive than your DATADIR + - reread config on SIGHUP from 0.2.0 to 0.2.1 - fail gracefully at a lack of configuration diff --git a/trunk/ripnews/TODO b/trunk/ripnews/TODO index dd1db6b..30a2425 100644 --- a/trunk/ripnews/TODO +++ b/trunk/ripnews/TODO @@ -1,4 +1,4 @@ -# $Dwarf: TODO,v 1.18 2003/06/15 21:37:27 ward Exp $ +# $Dwarf: TODO,v 1.19 2003/06/23 07:38:07 ward Exp $ # $Source$ [ ] check for multiple servers (ip adresses) for each name and pick @@ -21,5 +21,4 @@ [ ] more regression tests [ ] update documentation [ ] start useing file locking (needed for safe threading) -[ ] reload config on HUP [ ] implement include statement in config file diff --git a/trunk/ripnews/ripnews.rb b/trunk/ripnews/ripnews.rb index a9dcf1d..a3bd713 100755 --- a/trunk/ripnews/ripnews.rb +++ b/trunk/ripnews/ripnews.rb @@ -1,6 +1,6 @@ #!/usr/local/bin/ruby -w -# $Dwarf: ripnews.rb,v 1.70 2003/06/20 09:56:15 ward Exp $ +# $Dwarf: ripnews.rb,v 1.71 2003/06/20 22:20:35 ward Exp $ # $Source$ require 'date' @@ -472,13 +472,20 @@ end ############################################################################################# $stdout.sync=true # line buffered output -defaults = {'-c' => "#{ENV['HOME']}/.ripnewsrc"} -defaults = parse_options(defaults) -parse_config(defaults) +@defaults = {'-c' => "#{ENV['HOME']}/.ripnewsrc"} +@defaults = parse_options(@defaults) +parse_config(@defaults) check_config lock renice +trap("HUP") { + puts "Rereading config...\n" + parse_config(@defaults) + check_config + puts "Done reading config\n +} + @maxfilelength = get_max_file_length(@config[@config.keys[0]]["TEMPDIR"]) print "\n$Id$\n"