From 95ac2f5841a70e12e1d5e687bce188f5037a7ff3 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Wed, 23 Sep 2020 23:50:59 +0900 Subject: [PATCH] Delete `check-reboot-required`. --- cookbooks/consul/default.rb | 2 -- .../files/etc/consul.d/check-reboot-required.json | 9 --------- cookbooks/consul/files/usr/local/bin/check_file | 9 --------- cookbooks/consul/monitoring.rb | 15 --------------- 4 files changed, 35 deletions(-) delete mode 100644 cookbooks/consul/files/etc/consul.d/check-reboot-required.json delete mode 100644 cookbooks/consul/files/usr/local/bin/check_file delete mode 100644 cookbooks/consul/monitoring.rb diff --git a/cookbooks/consul/default.rb b/cookbooks/consul/default.rb index 9d0f7ee..21b3499 100644 --- a/cookbooks/consul/default.rb +++ b/cookbooks/consul/default.rb @@ -7,5 +7,3 @@ include_recipe './install.rb' include_recipe './setup.rb' include_recipe './dnsmasq.rb' - -include_recipe './monitoring.rb' diff --git a/cookbooks/consul/files/etc/consul.d/check-reboot-required.json b/cookbooks/consul/files/etc/consul.d/check-reboot-required.json deleted file mode 100644 index 0046b7d..0000000 --- a/cookbooks/consul/files/etc/consul.d/check-reboot-required.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "check": { - "id": "reboot-required", - "name": "Check for Reboot Required", - "args": ["/usr/local/bin/check_file", "/var/run/reboot-required"], - "interval": "86400s", - "timeout": "10s" - } -} diff --git a/cookbooks/consul/files/usr/local/bin/check_file b/cookbooks/consul/files/usr/local/bin/check_file deleted file mode 100644 index 8622cee..0000000 --- a/cookbooks/consul/files/usr/local/bin/check_file +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -TARGET=$1 - -if [ -f ${TARGET} ]; then - exit 1 -fi - -exit 0 diff --git a/cookbooks/consul/monitoring.rb b/cookbooks/consul/monitoring.rb deleted file mode 100644 index 63944de..0000000 --- a/cookbooks/consul/monitoring.rb +++ /dev/null @@ -1,15 +0,0 @@ -remote_file '/usr/local/bin/check_file' do - owner 'root' - group 'root' - mode '755' -end - -%w(reboot-required).each do |conf| - remote_file "/etc/consul.d/check-#{conf}.json" do - owner 'root' - group 'root' - mode '644' - - notifies :restart, 'service[supervisor]' - end -end