diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-14 14:50:22 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-07-14 14:50:22 +0100 |
commit | 494b083408b354f38da9b1fc5e8ffb7238d009b3 (patch) | |
tree | 4a9122f13b4f36840a2223616b41e3608ae9ba4f /bin | |
parent | e07cea09e884607d6ad005f5e2822251ca31b9ba (diff) |
Fixed mauveclient to obey time multipliers
Fixed logrotate script to rotate the correct script
Init script now uses the correct user
lib/mauve/history.rb is now installed
Further logging cleanups
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/mauveclient | 6 | ||||
-rwxr-xr-x | bin/mauveserver | 7 |
2 files changed, 6 insertions, 7 deletions
diff --git a/bin/mauveclient b/bin/mauveclient index 251b45b..e3bc453 100755 --- a/bin/mauveclient +++ b/bin/mauveclient @@ -183,9 +183,9 @@ def parse_time_spec(spec = "now") end multiplier *= case $3 - when ?m then 60 - when ?h then 3600 - when ?d then 86400 + when "m" then 60 + when "h" then 3600 + when "d" then 86400 else 1 end diff --git a/bin/mauveserver b/bin/mauveserver index a5cf7b5..4ac5a6d 100755 --- a/bin/mauveserver +++ b/bin/mauveserver @@ -68,8 +68,6 @@ end %w(HUP).each do |sig| trap(sig) do - # this blows up if you do it twice in quick succession, but don't really - # care about that case as it's only for log rotation. Mauve::Server.instance.logger.warn "#{sig} signal received. Restarting." Mauve::Server.instance.stop @@ -80,7 +78,7 @@ end new_config = Mauve::ConfigurationBuilder.load(configuration_file) Mauve::Configuration.current = new_config rescue BuildException => ex - Mauve::Server.instance.logger.error "Reconfiguration failed: #{ex}. Sticking with old one." + Mauve::Server.instance.logger.error "Reconfiguration failed: #{ex.to_s}. Sticking with old one." end Mauve::Server.instance.logger.warn "Restarting." Mauve::Server.instance.start @@ -90,6 +88,7 @@ end %w(USR1).each do |sig| trap(sig) do Mauve::Server.instance.logger.warn "#{sig} signal received. Re-opening logs." + Log4r::Outputter.each_outputter do |old| next unless old.is_a?(Log4r::FileOutputter) @@ -101,7 +100,7 @@ end Mauve::Server.instance.logger.outputters.delete(old) old.close - Mauve::Server.instance.logger.debug "Opened #{new.filename}." + Mauve::Server.instance.logger.info "Opened #{new.filename}." end end end |