Sha256: d7692ad2ec8aa5e89cf65ef7ca904c55bd960a911dd864043befb55e51e68ed1
Contents?: true
Size: 546 Bytes
Versions: 14
Compression:
Stored size: 546 Bytes
Contents
module Traquitana class Cleaner attr_accessor :network def initialize @config = Traquitana::Config.instance @config.load @options = @config.password.size > 1 ? { password: @config.password } : {} @network = Traquitana::SSH.new(@config.host, @config.user, @options) end def run STDOUT.print 'Cleaning old files ... ' @network.execute(["find #{@config.directory}/traq -type f -iname '*.zip' -o -iname '*.list' | sort | head -n-2 | xargs rm $1"]) STDOUT.puts 'done.' end end end
Version data entries
14 entries across 14 versions & 1 rubygems