From a471ca233a99f4e6824ed0a16b65f069e3f148c2 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Thu, 29 Aug 2019 13:42:23 +0200
Subject: [PATCH] #5373 No file when dns zone delete.

---
 server/plugins-available/bind_plugin.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/plugins-available/bind_plugin.inc.php b/server/plugins-available/bind_plugin.inc.php
index 29d841ef8a..e8b72b5dbc 100644
--- a/server/plugins-available/bind_plugin.inc.php
+++ b/server/plugins-available/bind_plugin.inc.php
@@ -391,7 +391,7 @@ class bind_plugin {
 		$app->log("Deleting BIND domain file: ".$zone_file_name, LOGLEVEL_DEBUG);
 
  		//* DNSSEC-Implementation
- 		if($data['old']['dnssec_initialized'] == 'Y') {
+ 		if($data['old']['dnssec_initialized'] == 'Y' && file_exists('/usr/local/ispconfig/server/scripts/dnssec-delete.sh')) {
 			//delete keys
 			$app->system->exec_safe('/usr/local/ispconfig/server/scripts/dnssec-delete.sh ?', $data['old']['origin']);
 		}
-- 
GitLab