#!/usr/bin/env ruby
trap(:INT) { puts ""; Kernel.exit! 1 }

require 'libcb/ctl'

ENV['SVWAIT'] = "30"
File.umask(022)

if ENV['PSQL_INTERNAL_OK'] != "true" && Process.euid != 0
  puts "This command must be run as root."
  exit 1
end

ctl = LibCB::Ctl.new(ARGV)
ctl.run
