Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Modify erlang-rrdtool to be compatible with rebar

  • Loading branch information...
commit 3786d7c0a3287bed8c7a56d67cf999adda54973d 1 parent 04122ed
@afternoon afternoon authored
View
3  .gitignore
@@ -0,0 +1,3 @@
+.DS_Store
+*.beam
+*.sw[op]
View
8 ebin/rrdtool.app
@@ -0,0 +1,8 @@
+{application,rrdtool,
+ [{description,"Erlang-rrdtool is a simple module to allow rrdtool to be treated like an erlang port via its 'remote control' mode (rrdtool -)."},
+ {vsn,"1"},
+ {registered,[]},
+ {applications,[kernel,stdlib]},
+ {mod,{rrdtool_app,[]}},
+ {env,[]},
+ {modules,[rrdtool,rrdtool_app,rrdtool_sup]}]}.
View
12 src/rrdtool.app.src
@@ -0,0 +1,12 @@
+{application, rrdtool,
+ [
+ {description, "Erlang-rrdtool is a simple module to allow rrdtool to be treated like an erlang port via its 'remote control' mode (rrdtool -)."},
+ {vsn, "1"},
+ {registered, []},
+ {applications, [
+ kernel,
+ stdlib
+ ]},
+ {mod, {rrdtool_app, []}},
+ {env, []}
+ ]}.
View
16 src/rrdtool_app.erl
@@ -0,0 +1,16 @@
+-module(rrdtool_app).
+
+-behaviour(application).
+
+%% Application callbacks
+-export([start/2, stop/1]).
+
+%% ===================================================================
+%% Application callbacks
+%% ===================================================================
+
+start(_StartType, _StartArgs) ->
+ rrdtool_sup:start_link().
+
+stop(_State) ->
+ ok.
View
28 src/rrdtool_sup.erl
@@ -0,0 +1,28 @@
+
+-module(rrdtool_sup).
+
+-behaviour(supervisor).
+
+%% API
+-export([start_link/0]).
+
+%% Supervisor callbacks
+-export([init/1]).
+
+%% Helper macro for declaring children of supervisor
+-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
+
+%% ===================================================================
+%% API functions
+%% ===================================================================
+
+start_link() ->
+ supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+
+%% ===================================================================
+%% Supervisor callbacks
+%% ===================================================================
+
+init([]) ->
+ {ok, { {one_for_one, 5, 10}, []} }.
+
Please sign in to comment.
Something went wrong with that request. Please try again.