fix(confd): simplify check_cmd and fix grep usage