Skip to content

Commit

Permalink
set log files mode to 0644
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hale committed Feb 25, 2009
1 parent f6ad38d commit 0789b2c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion lib/daemons/application.rb
Expand Up @@ -55,7 +55,6 @@ def pidfile_dir
end

def logdir
debugger
logdir = options[:log_dir]
unless logdir
logdir = options[:dir_mode] == :system ? '/var/log' : pidfile_dir
Expand Down
3 changes: 2 additions & 1 deletion lib/daemons/daemonize.rb
Expand Up @@ -246,7 +246,8 @@ def redirect_io(logfile_name)

if logfile_name
begin
STDOUT.reopen logfile_name, "a"
STDOUT.reopen logfile_name, "a"
File.chmod(0644, logfile_name)
STDOUT.sync = true
rescue ::Exception
begin; STDOUT.reopen "/dev/null"; rescue ::Exception; end
Expand Down

0 comments on commit 0789b2c

Please sign in to comment.