Sha256: 08d15016a2f3f01d9427ab137cfff7987a9b7e1e59e71e4eaf1c85aa148e31c0

Contents?: true

Size: 461 Bytes

Versions: 34

Compression:

Stored size: 461 Bytes

Contents

module Perus::Pinger
    class KillProcess < Command
        description 'Kills all instances of a process. Valid values for
                     "process_name" are contained in the pinger config file.'
        option :process_name, restricted: true
        option :signal, default: 'TERM'

        def run
            result = shell("killall -#{options.signal} #{options.process_name}")
            true # shell will capture any errors
        end
    end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
perus-1.0.7 lib/perus/pinger/commands/kill_process.rb
perus-1.0.6 lib/perus/pinger/commands/kill_process.rb
perus-1.0.5 lib/perus/pinger/commands/kill_process.rb
perus-1.0.4 lib/perus/pinger/commands/kill_process.rb
perus-1.0.3 lib/perus/pinger/commands/kill_process.rb
perus-1.0.2 lib/perus/pinger/commands/kill_process.rb
perus-1.0.1 lib/perus/pinger/commands/kill_process.rb
perus-1.0.0 lib/perus/pinger/commands/kill_process.rb
perus-0.1.35 lib/perus/pinger/commands/kill_process.rb
perus-0.1.34 lib/perus/pinger/commands/kill_process.rb
perus-0.1.33 lib/perus/pinger/commands/kill_process.rb
perus-0.1.32 lib/perus/pinger/commands/kill_process.rb
perus-0.1.31 lib/perus/pinger/commands/kill_process.rb
perus-0.1.30 lib/perus/pinger/commands/kill_process.rb
perus-0.1.29 lib/perus/pinger/commands/kill_process.rb
perus-0.1.28 lib/perus/pinger/commands/kill_process.rb
perus-0.1.27 lib/perus/pinger/commands/kill_process.rb
perus-0.1.26 lib/perus/pinger/commands/kill_process.rb
perus-0.1.25 lib/perus/pinger/commands/kill_process.rb
perus-0.1.24 lib/perus/pinger/commands/kill_process.rb