From f892dd42547385473fc0b913fc9017e49b7e2054 Mon Sep 17 00:00:00 2001 From: Monocots Date: Wed, 11 Sep 2019 09:49:00 +0000 Subject: [PATCH] Systemd should start runit after the network is UP --- modules/rhizo_base/files/systemd/runit.service | 14 ++++++++++++++ modules/rhizo_base/manifests/runit.pp | 6 ++++++ 2 files changed, 20 insertions(+) create mode 100644 modules/rhizo_base/files/systemd/runit.service diff --git a/modules/rhizo_base/files/systemd/runit.service b/modules/rhizo_base/files/systemd/runit.service new file mode 100644 index 0000000..22ee14c --- /dev/null +++ b/modules/rhizo_base/files/systemd/runit.service @@ -0,0 +1,14 @@ +[Unit] +Description=Runit service supervision +Documentation=http://smarden.org/runit/ +After=network-online.target +Wants=network-online.target + +[Service] +ExecStart=/etc/runit/2 +KillSignal=SIGHUP +KillMode=process +Restart=always + +[Install] +WantedBy=multi-user.target diff --git a/modules/rhizo_base/manifests/runit.pp b/modules/rhizo_base/manifests/runit.pp index 493fdd0..41cd5a6 100644 --- a/modules/rhizo_base/manifests/runit.pp +++ b/modules/rhizo_base/manifests/runit.pp @@ -11,6 +11,12 @@ # Sample Usage: # class rhizo_base::runit { + + file { '/lib/systemd/system/runit.service': + ensure => present, + source => 'puppet:///modules/rhizo_base/systemd/runit.service', + } + file { '/etc/sv': ensure => directory, source => 'puppet:///modules/rhizo_base/etc/sv',