28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/config_o_mat/meta_configurator/op/generate_systemd_config.rb', line 28
def call
grouped_restart_modes = service_defs.values.group_by(&:restart_mode)
restarts = grouped_restart_modes.fetch(:restart, []) + grouped_restart_modes.fetch(:restart_all, [])
flip_flops = grouped_restart_modes[:flip_flop]
nones = grouped_restart_modes[:none]
enable_restarts(restarts) if !restarts.empty?
enable_flip_flops(flip_flops) if flip_flops
enable_nones(nones) if nones
systemd_interface.daemon_reload
end
|