Sha256: 40c62fc4a5feb5dbd7721f8af386e7ddf3524e3fa41af8c4f56ed6261c696f1e
Contents?: true
Size: 1.17 KB
Versions: 32
Compression:
Stored size: 1.17 KB
Contents
require "thor" require 'sqlite3' require "dns_one" require "dns_one/setup" class DnsOne::CLI < Thor default_task :run_srv # RUN desc "run", "run server" option :conf option :work_dir def run_srv DnsOne::DnsOne.new( conf_file: options[:conf], work_dir: options[:work_dir] ).start end # INSTALL desc "install", "install dns_one" def install DnsOne::Setup.new.install end desc "uninstall", "uninstall dns_one" def uninstall DnsOne::Setup.new.uninstall end # MANAGE desc "start", "start dns_one" def start DnsOne::Util.ensure_sytemd DnsOne::Util.run "systemctl start #{DnsOne::Setup::SERVICE_NAME}" end desc "stop", "stop dns_one" def stop DnsOne::Util.ensure_sytemd DnsOne::Util.run "systemctl stop #{DnsOne::Setup::SERVICE_NAME}" end desc "status", "check dns_one status" def status DnsOne::Util.ensure_sytemd DnsOne::Util.run "systemctl status #{DnsOne::Setup::SERVICE_NAME}" end # STATS desc "stats", "show counters" def stats DnsOne::Stat.print end end
Version data entries
32 entries across 32 versions & 1 rubygems