From b8c4513c5fa17476786e7d4920d20b8c94bfbde9 Mon Sep 17 00:00:00 2001 From: Dmitry Gritsay Date: Thu, 12 Apr 2018 13:04:11 +0300 Subject: [PATCH] Fix creation of systemd service - Bump cookbook version to `0.3.0` - Lock `systemd` version to `~> 3.2.2` - Move `description`, `after` and `condition_path_exists` under `unit` section --- metadata.rb | 4 ++-- recipes/default.rb | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/metadata.rb b/metadata.rb index eb11be2..ffd04fd 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,11 +4,11 @@ license 'Apache 2.0' description 'Installs/Configures exabgp' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.2.0' +version '0.3.0' supports 'ubuntu', '>= 12.04' supports 'centos', '>= 6.0' depends 'python' depends 'runit' -depends 'systemd' +depends 'systemd', '~> 3.2.2' diff --git a/recipes/default.rb b/recipes/default.rb index 05891b5..c135d9a 100644 --- a/recipes/default.rb +++ b/recipes/default.rb @@ -72,9 +72,11 @@ end unless systemd_enabled systemd_service 'exabgp' do - description 'ExaBGP service' - after node[:exabgp][:systemd][:after] - condition_path_exists '/etc/exabgp/exabgp.conf' + unit do + description 'ExaBGP service' + after node[:exabgp][:systemd][:after] + condition_path_exists '/etc/exabgp/exabgp.conf' + end service do environment 'exabgp_daemon_daemonize' => 'false'