From 439489b42b3fa70ad18058a9a08e585fb920328d Mon Sep 17 00:00:00 2001 From: Matt Johnson Date: Sun, 14 Jul 2019 23:27:20 -0500 Subject: [PATCH] rhizo_base: Ensure runit installed before using runit Make sure that runit is installed and configured before attempting to restart services using /usr/bin/sv (aka runit). --- modules/rhizo_base/manifests/init.pp | 5 +++++ modules/rhizo_base/manifests/lcr.pp | 1 + 2 files changed, 6 insertions(+) diff --git a/modules/rhizo_base/manifests/init.pp b/modules/rhizo_base/manifests/init.pp index 8636939..c783467 100644 --- a/modules/rhizo_base/manifests/init.pp +++ b/modules/rhizo_base/manifests/init.pp @@ -398,26 +398,31 @@ schedule { 'repo': exec { 'restart-freeswitch': command => '/usr/bin/sv restart freeswitch', + require => Class['rhizo_base::runit'], refreshonly => true, } exec { 'restart-rapi': command => '/usr/bin/sv restart rapi', + require => Class['rhizo_base::runit'], refreshonly => true, } exec { 'restart-smpp': command => '/usr/bin/sv restart smpp', + require => Class['rhizo_base::runit'], refreshonly => true, } exec { 'restart-meas': command => '/usr/bin/sv restart meas-web', + require => Class['rhizo_base::runit'], refreshonly => true, } exec { 'restart-esme': command => '/usr/bin/sv restart esme', + require => Class['rhizo_base::runit'], refreshonly => true, } diff --git a/modules/rhizo_base/manifests/lcr.pp b/modules/rhizo_base/manifests/lcr.pp index 1a5dd5c..05cda35 100644 --- a/modules/rhizo_base/manifests/lcr.pp +++ b/modules/rhizo_base/manifests/lcr.pp @@ -19,6 +19,7 @@ class rhizo_base::lcr { exec { 'restart-lcr': command => '/usr/bin/sv restart lcr', + require => Class['rhizo_base::runit'], refreshonly => true, }