def valToBool(rawVal):
  """
  Convert string or integer value from the config file or command line to a boolean.
  """
  retVal = False

  if type(rawVal) == str:
    retVal = (rawVal.strip().strip('"').lower()[0] in ['y','t','1'])

  else:
    try:
      retVal = bool(rawVal)
    except:
      retVal = False

  return retVal