Browse files

Added checks for plugin directory, and fixed devboot to have one.

  • Loading branch information...
1 parent 4939c2d commit 4fc3b489d761d0e16f548ca0bfdb2aacff292e4b @lordnull lordnull committed Apr 25, 2012
Showing with 8 additions and 2 deletions.
  1. +2 −1 devboot
  2. +6 −1 src/cpx.erl
View
3 devboot
@@ -98,7 +98,8 @@ if [ ! -f $CONFIG ] && [ ! -f "${CONFIG}.config" ]; then
[{'OpenACD', [
{nodes, ['$CONFIGNODENAME']},
{console_loglevel, info},
- {logfiles, [{"full.log", debug}, {"console.log", info}]}
+ {logfiles, [{"full.log", debug}, {"console.log", info}]},
+ {plugin_dir, "plugins.d"}
]},
{sasl, [
{errlog_type, error} % disable SASL progress reports
View
7 src/cpx.erl
@@ -148,7 +148,12 @@ start(_Type, StartArgs) ->
undefined ->
?INFO("No plugins to load, no plugin dir", []);
{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),
{ok, Pid}

0 comments on commit 4fc3b48

Please sign in to comment.