blob: 6da421d3ac09913656a3de2cb5861c9894c2d3fd [file] [log] [blame]
Harald Weltec6e466e2011-10-10 14:03:50 +02001-module(osmo_ss7_app).
2-behaviour(application).
3-author('Harald Welte <laforge@gnumonks.org>').
4
5% application behaviour callbacks
6-export([start/2, start_phase/3, prep_stop/1, stop/1, config_change/3]).
7
8-export([reload_config/0]).
9
10start(normal, StartArgs) ->
Harald Welted44e3ea2013-09-08 21:33:10 +020011 {ok, Pid} = supervisor:start_link({local, osmo_ss7_sup}, osmo_ss7_sup, StartArgs),
12 reload_config(),
13 {ok, Pid}.
Harald Weltec6e466e2011-10-10 14:03:50 +020014
15
16start_phase(_Phase, _StartType, _PhaseArgs) ->
17 ok.
18
19prep_stop(State) ->
20 State.
21
22stop(_State) ->
23 ok.
24
25config_change(_Changed, _New, _Removed) ->
26 ok.
27
28
29
30reload_config() ->
31 osmo_util:reload_config(),
Harald Welted44e3ea2013-09-08 21:33:10 +020032 % fixme: why not in config/change/3 ?
33 ss7_links:reload_config(),
34 ss7_routes:reload_config(),
Harald Weltec6e466e2011-10-10 14:03:50 +020035 ok.