Skip to content

Commit 4966024

Browse files
author
Marius Burkard
committed
- update LE must be called on sub/alias deleting too
1 parent a49635d commit 4966024

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

server/plugins-available/apache2_plugin.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class apache2_plugin {
3636
// private variables
3737
var $action = '';
3838
var $ssl_certificate_changed = false;
39+
var $update_letsencrypt = false;
3940

4041
//* This function is called during ispconfig installation to determine
4142
// if a symlink shall be created for this plugin.
@@ -485,8 +486,6 @@ function update($event_name, $data) {
485486

486487
if($this->action != 'insert') $this->action = 'update';
487488

488-
$update_letsencrypt = false;
489-
490489
if($data['new']['type'] != 'vhost' && $data['new']['type'] != 'vhostsubdomain' && $data['new']['type'] != 'vhostalias' && $data['new']['parent_domain_id'] > 0) {
491490

492491
$old_parent_domain_id = intval($data['old']['parent_domain_id']);
@@ -506,7 +505,7 @@ function update($event_name, $data) {
506505
$data['new'] = $tmp;
507506
$data['old'] = $tmp;
508507
$this->action = 'update';
509-
$update_letsencrypt = true;
508+
$this->update_letsencrypt = true;
510509
}
511510

512511
// load the server configuration options
@@ -1180,7 +1179,7 @@ function update($event_name, $data) {
11801179
($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration
11811180
|| ($data['old']['domain'] != $data['new']['domain']) // we have domain update
11821181
|| ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain
1183-
|| $update_letsencrypt == true
1182+
|| $this->update_letsencrypt == true
11841183
)) {
11851184
// default values
11861185
$temp_domains = array();
@@ -2139,6 +2138,7 @@ function delete($event_name, $data) {
21392138
$data['new'] = $tmp;
21402139
$data['old'] = $tmp;
21412140
$this->action = 'update';
2141+
$this->update_letsencrypt = true;
21422142
// just run the update function
21432143
$this->update($event_name, $data);
21442144

server/plugins-available/nginx_plugin.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class nginx_plugin {
3636
// private variables
3737
var $action = '';
3838
var $ssl_certificate_changed = false;
39+
var $update_letsencrypt = false;
3940

4041
//* This function is called during ispconfig installation to determine
4142
// if a symlink shall be created for this plugin.
@@ -333,8 +334,6 @@ function update($event_name, $data) {
333334
return 0;
334335
}
335336

336-
$update_letsencrypt = false;
337-
338337
if($this->action != 'insert') $this->action = 'update';
339338

340339
if($data['new']['type'] != 'vhost' && $data['new']['type'] != 'vhostsubdomain' && $data['new']['type'] != 'vhostalias' && $data['new']['parent_domain_id'] > 0) {
@@ -356,7 +355,7 @@ function update($event_name, $data) {
356355
$data['new'] = $tmp;
357356
$data['old'] = $tmp;
358357
$this->action = 'update';
359-
$update_letsencrypt = true;
358+
$this->update_letsencrypt = true;
360359
}
361360

362361
// load the server configuration options
@@ -1254,7 +1253,7 @@ function update($event_name, $data) {
12541253
($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration
12551254
|| ($data['old']['domain'] != $data['new']['domain']) // we have domain update
12561255
|| ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain
1257-
|| $update_letsencrypt == true
1256+
|| $this->update_letsencrypt == true
12581257
)) {
12591258
// default values
12601259
$temp_domains = array();
@@ -2160,6 +2159,7 @@ function delete($event_name, $data) {
21602159
$data['new'] = $tmp;
21612160
$data['old'] = $tmp;
21622161
$this->action = 'update';
2162+
$this->update_letsencrypt = true;
21632163
// just run the update function
21642164
$this->update($event_name, $data);
21652165

0 commit comments

Comments
 (0)