def start
      begin
        @drb ||= DRb.start_service(self.socket, self)
        applog(nil, :info, "Started on #{DRb.uri}")
      rescue Errno::EADDRINUSE
        applog(nil, :info, "Socket already in use")
        server = DRbObject.new(nil, self.socket)

        begin
          Timeout.timeout(5) do
            server.ping
          end
          abort "Socket #{self.socket} already in use by another instance of god"
        rescue StandardError, Timeout::Error
          applog(nil, :info, "Socket is stale, reopening")
          File.delete(self.socket_file) rescue nil
          @drb ||= DRb.start_service(self.socket, self)
          applog(nil, :info, "Started on #{DRb.uri}")
        end
      end

      if File.exists?(self.socket_file)
        if @user
          user_method = @user.is_a?(Integer) ? :getpwuid : :getpwnam
          uid = Etc.send(user_method, @user).uid
          gid = Etc.send(user_method, @user).gid
        end
        if @group
          group_method = @group.is_a?(Integer) ? :getgrgid : :getgrnam
          gid = Etc.send(group_method, @group).gid
        end

        File.chmod(Integer(@perm), socket_file) if @perm
        File.chown(uid, gid, socket_file) if uid or gid
      end
    end
def start
      begin
        @drb ||= DRb.start_service(self.socket, self)
        applog(nil, :info, "Started on #{DRb.uri}")
      rescue Errno::EADDRINUSE
        applog(nil, :info, "Socket already in use")
        server = DRbObject.new(nil, self.socket)

        begin
          Timeout.timeout(5) do
            server.ping
          end
          abort "Socket #{self.socket} already in use by another instance of god"
        rescue StandardError, Timeout::Error
          applog(nil, :info, "Socket is stale, reopening")
          File.delete(self.socket_file) rescue nil
          @drb ||= DRb.start_service(self.socket, self)
          applog(nil, :info, "Started on #{DRb.uri}")
        end
      end

      if File.exists?(self.socket_file)
        if @user
          user_method = @user.is_a?(Integer) ? :getpwuid : :getpwnam
          uid = Etc.send(user_method, @user).uid
          gid = Etc.send(user_method, @user).gid
        end
        if @group
          group_method = @group.is_a?(Integer) ? :getgrgid : :getgrnam
          gid = Etc.send(group_method, @group).gid
        end

        File.chmod(Integer(@perm), socket_file) if @perm
        File.chown(uid, gid, socket_file) if uid or gid
      end
    end
Start the DRb server. Abort if there is already a running god instance
 on the socket.

 Returns nothing