diff --git a/priv/fileSync b/priv/fileSync index 567f3e3..eab37de 100644 Binary files a/priv/fileSync and b/priv/fileSync differ diff --git a/priv/fileSync.exe b/priv/fileSync.exe index 89694c3..c3a7eba 100644 Binary files a/priv/fileSync.exe and b/priv/fileSync.exe differ diff --git a/src/eSync.app.src b/src/eSync.app.src index 45f611f..34ad414 100644 --- a/src/eSync.app.src +++ b/src/eSync.app.src @@ -2,7 +2,7 @@ [{description, "erlang code auto compile and loader"}, {vsn, "0.1.0"}, {registered, []}, - {mod, {eSync_app, []}}, + {mod, {eSync, []}}, {applications, [kernel, stdlib, syntax_tools, compiler]}, {env, []}, {modules, []}, diff --git a/src/eSync.erl b/src/eSync.erl index fbdcfb6..9b3056d 100644 --- a/src/eSync.erl +++ b/src/eSync.erl @@ -35,6 +35,7 @@ -define(logWarnings(Format, Args), canLog(warnings) andalso error_logger:info_msg("eSync[~p:~p|~p] " ++ Format, [?MODULE, ?FUNCTION_NAME, ?LINE] ++ Args)). -export([ + start/2, start/0, stop/0, run/0 @@ -67,6 +68,9 @@ terminate/3 ]). +start(_StartType, _StartArgs) -> + start_link(). + start() -> application:ensure_all_started(eSync). diff --git a/src/eSync_app.erl b/src/eSync_app.erl deleted file mode 100644 index b066e6c..0000000 --- a/src/eSync_app.erl +++ /dev/null @@ -1,10 +0,0 @@ --module(eSync_app). --behaviour(application). - --export([start/2, stop/1]). - -start(_StartType, _StartArgs) -> - eSync_sup:start_link(). - -stop(_State) -> - ok. \ No newline at end of file diff --git a/src/eSync_sup.erl b/src/eSync_sup.erl deleted file mode 100644 index 296a9ab..0000000 --- a/src/eSync_sup.erl +++ /dev/null @@ -1,25 +0,0 @@ --module(eSync_sup). - --behaviour(supervisor). - --export([ - start_link/0 - , init/1 -]). - -start_link() -> - supervisor:start_link({local, ?MODULE}, ?MODULE, []). - -init([]) -> - SupFlags = #{strategy => one_for_one, intensity => 5, period => 10}, - ChildSpecs = [ - #{ - id => eSync, - start => {eSync, start_link, []}, - restart => permanent, - shutdown => brutal_kill, - type => worker, - modules => [eSync] - }], - {ok, {SupFlags, ChildSpecs}}. -