#!/usr/bin/env ruby
######################################################
###
##  File: im_gateway_control
##  Desc: daemon control element of the im_gateway.rb server
#
# NOTE: Supports the following command line arguments:
#       start stop restart status
#
# NOTE: The pid file is parent directory of the server as:
#       #{server.basename}.pid

require 'pathname'
require 'daemons'

server  = Pathname.new(__FILE__).realpath.parent + 'im_gateway.rb'

Daemons.run(server)
