qbit/consul-client/src/main/java/io/advantageous/consul/endpoints/AgentEndpoint.java
public void registerServiceWithScript(final String host,
                                          final int port,
                                          final String script,
                                          final long interval,
                                          final String serviceName,
                                          final String serviceId,
                                          final String... tags) {
        RegistrationCheck check = new RegistrationCheck();
        check.setScript(script);
        check.setInterval("" + interval + "s");
        registerServiceWithRegistrationCheck(host, port, check, serviceName, serviceId, tags);
    }
public void registerServiceWithScript(final String host,
                                          final int port,
                                          final String script,
                                          final long interval,
                                          final String serviceName,
                                          final String serviceId,
                                          final String... tags) {
        RegistrationCheck check = new RegistrationCheck();
        check.setScript(script);
        check.setInterval("" + interval + "s");
        registerServiceWithRegistrationCheck(host, port, check, serviceName, serviceId, tags);
    }
Registers the client as a service with Consul.
Registration enables
the use of check with a script.

@param host        The public facing host of the service to register with Consul.
@param port        The public facing port of the service to register with Consul.
@param script      Health script for Consul to use.
@param interval    Health script run interval in seconds.
@param serviceName Service name to register.
@param serviceId   Service id to register.
@param tags        Tags to register with.