[refs #2161] Add sudo to Download.rotate_nginx_log method

This commit is contained in:
konstantin.grabar 2011-10-31 15:50:14 +04:00
parent 17f0192e03
commit d67f61fc51
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ class Download < ActiveRecord::Base
class << self
def rotate_nginx_log
system("mv #{ APP_CONFIG['nginx_log'] } #{ PREV_LOG_FILE }")
system("sudo mv #{ APP_CONFIG['nginx_log'] } #{ PREV_LOG_FILE }")
#system("sudo kill -USR1 `cat #{ APP_CONFIG['nginx_pid'] }`")
system("sudo /opt/nginx/sbin/nginx -s reload")
end