From 62c7a0c51b4589be458ca5528384a7ca940a174c Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Mon, 24 Mar 2014 17:27:47 +0000 Subject: [PATCH] Add support to restart unbound with systemd Adds support for Fedora. Change-Id: Ide7a63d070dac07b276dfa55da8db2ff089f1e71 --- .../files/nodepool/scripts/prepare_node.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_node.sh b/modules/openstack_project/files/nodepool/scripts/prepare_node.sh index 8f1d103013..ad7b8df7a6 100755 --- a/modules/openstack_project/files/nodepool/scripts/prepare_node.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_node.sh @@ -65,7 +65,14 @@ if [ -x /sbin/restorecon ] ; then fi sudo bash -c "echo 'include: /etc/unbound/forwarding.conf' >> /etc/unbound/unbound.conf" -sudo /etc/init.d/unbound restart +if [ -e /etc/init.d/unbound ] ; then + sudo /etc/init.d/unbound restart +elif [ -e /usr/lib/systemd/system/unbound.service ] ; then + sudo systemctl restart unbound +else + echo "Can't discover a method to restart \"unbound\"" + exit 1 +fi # Make sure DNS works. dig git.openstack.org