Skip to content

Instantly share code, notes, and snippets.

@cobusc
Created July 25, 2013 06:36
Show Gist options
  • Save cobusc/6077371 to your computer and use it in GitHub Desktop.
Save cobusc/6077371 to your computer and use it in GitHub Desktop.
Example of how to reload the application sys.config file without restarting the node.

Taken from http://comments.gmane.org/gmane.comp.lang.erlang.general/15718 with minor fix:

reload_config(AppNames, ConfigFile) ->
     {ok, [Config]} = file:consult(ConfigFile),
     Apps = [{application, A, element(2,application:get_all_key(A))}
             || {A,_,_} <- application:which_applications()],
     application_controller:change_application_data(Apps,Config).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment