Skip to content

Commit

Permalink
Added checks for plugin directory, and fixed devboot to have one.
Browse files Browse the repository at this point in the history
  • Loading branch information
lordnull committed Apr 25, 2012
1 parent 4939c2d commit 4fc3b48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion devboot
Expand Up @@ -98,7 +98,8 @@ if [ ! -f $CONFIG ] && [ ! -f "${CONFIG}.config" ]; then
[{'OpenACD', [ [{'OpenACD', [
{nodes, ['$CONFIGNODENAME']}, {nodes, ['$CONFIGNODENAME']},
{console_loglevel, info}, {console_loglevel, info},
{logfiles, [{"full.log", debug}, {"console.log", info}]} {logfiles, [{"full.log", debug}, {"console.log", info}]},
{plugin_dir, "plugins.d"}
]}, ]},
{sasl, [ {sasl, [
{errlog_type, error} % disable SASL progress reports {errlog_type, error} % disable SASL progress reports
Expand Down
7 changes: 6 additions & 1 deletion src/cpx.erl
Expand Up @@ -148,7 +148,12 @@ start(_Type, StartArgs) ->
undefined -> undefined ->
?INFO("No plugins to load, no plugin dir", []); ?INFO("No plugins to load, no plugin dir", []);
{ok, PluginDir} -> {ok, PluginDir} ->
start_plugins(PluginDir) case filelib:ensure_dir(filename:join(PluginDir, "touch")) of
ok ->
start_plugins(PluginDir);
{error, Error} ->
?ERROR("Could not ensure plugin directory ~s exists: ~p", [PluginDir, Error])
end
end end
end), end),
{ok, Pid} {ok, Pid}
Expand Down

0 comments on commit 4fc3b48

Please sign in to comment.