def chkopts(opts):
    # option check
    if not opts.dest:
        raise KssCommandOptException('ERROR: -d or --dest option is required.')
    elif not opts.tmp_port_conf:
        raise KssCommandOptException('ERROR: -p or --port option is required.')
    elif not opts.tmp_ssl_conf:
        raise KssCommandOptException('ERROR: -s or --ssl option is required.')
    elif not opts.tmp_access_conf:
        raise KssCommandOptException('ERROR: -a or --access option is required.')

    # exist check
    if os.path.isdir(opts.dest) is False:
        raise KssCommandOptException('ERROR: Not directory dest=%s' % opts.dest)
    elif os.path.isfile(opts.tmp_port_conf) is False:
        raise KssCommandOptException('ERROR: Not exist temporary file tmp_port_conf=%s' % opts.tmp_port_conf)
    elif os.path.isfile(opts.tmp_ssl_conf) is False:
        raise KssCommandOptException('ERROR: Not exist temporary file tmp_ssl_conf=%s' % opts.tmp_ssl_conf)
    elif os.path.isfile(opts.tmp_access_conf) is False:
        raise KssCommandOptException('ERROR: Not exist temporary file tmp_access_conf=%s' % opts.tmp_access_conf)
dataset/ETHPy150Open karesansui/karesansui/bin/apply_lighttpdconf.py/chkopts/original