lib/s3log/cron.rb in s3log-0.0.2 vs lib/s3log/cron.rb in s3log-0.0.3
- old
+ new
@@ -11,10 +11,10 @@
FileUtils.mkdir(@logdir) unless Dir.exists? @logdir
S3log::Log.set_logger(File.join(@logdir, 's3log.log'), @config['loglevel'])
end
def update
- line = "#{@schedule} cd #{@path} && bash -l -c 'bundle exec s3log download -c #{@configfile} >> /dev/null 2>&1' # s3log_#{@jobname}\n"
+ line = "#{@schedule} bash -l -c 'cd #{@path} && bundle exec s3log download -c #{@configfile} >> /dev/null 2>&1' # s3log_#{@jobname}\n"
tmp_cron_file = Tempfile.open('tmp_cron')
included = false
existing.each_line do |l|
if l =~ Regexp.new("# s3log_#{@jobname}")
tmp_cron_file << line