Update to new couch_epi API
diff --git a/src/setup_epi.erl b/src/setup_epi.erl
new file mode 100644
index 0000000..c3f2636
--- /dev/null
+++ b/src/setup_epi.erl
@@ -0,0 +1,49 @@
+% Licensed under the Apache License, Version 2.0 (the "License"); you may not
+% use this file except in compliance with the License. You may obtain a copy of
+% the License at
+%
+% http://www.apache.org/licenses/LICENSE-2.0
+%
+% Unless required by applicable law or agreed to in writing, software
+% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+% License for the specific language governing permissions and limitations under
+% the License.
+
+
+-module(setup_epi).
+
+-behaviour(couch_epi_plugin).
+
+-export([
+ app/0,
+ providers/0,
+ services/0,
+ data_subscriptions/0,
+ data_providers/0,
+ processes/0,
+ notify/3
+]).
+
+app() ->
+ setup.
+
+providers() ->
+ [
+ {chttpd_handlers, setup_httpd_handlers}
+ ].
+
+services() ->
+ [].
+
+data_subscriptions() ->
+ [].
+
+data_providers() ->
+ [].
+
+processes() ->
+ [].
+
+notify(_Key, _Old, _New) ->
+ ok.
diff --git a/src/setup_sup.erl b/src/setup_sup.erl
index c86237d..d8b7008 100644
--- a/src/setup_sup.erl
+++ b/src/setup_sup.erl
@@ -35,6 +35,4 @@
%% ===================================================================
init([]) ->
- {ok, { {one_for_one, 5, 10}, [
- chttpd_handlers:provider(setup, setup_httpd_handlers)
- ]} }.
+ {ok, {{one_for_one, 5, 10}, couch_epi:register_service(setup_epi)}}.