Sha256: 93ef08cf73884c1a8ebba1f23eaa75a1ce0278dfa90151d27ffd16ee58b17834
Contents?: true
Size: 841 Bytes
Versions: 10
Compression:
Stored size: 841 Bytes
Contents
# frozen_string_literal: true namespace :logrotate do include Capistrano::Ops::Logrotate::Helpers include Capistrano::Ops::Logrotate::Paths desc 'Enable logrotate for the application' task :enable do on roles(:app) do within release_path do @log_file_path = log_file_path @shared_path = shared_path if logrotate_enabled puts "logrotate already enabled:\n=========================" puts capture "cat #{logrotate_config_file_path}" else puts config_template puts schedule_template make_basepath upload! StringIO.new(config_template), logrotate_config_file_path upload! StringIO.new(schedule_template), logrotate_schedule_file_path whenever 'update' if logrotate_enabled end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems