Commit 80198b37 authored by Marius Burkard's avatar Marius Burkard
Browse files

- letsencrypt changes merged to nginx plugin

- fixed some smaller things in plugins for apache and nginx
parent 4bba7dd4
......@@ -1256,6 +1256,7 @@ class apache2_plugin {
//* check is been correctly created
if(file_exists($crt_tmp_file)) {
$date = date("YmdHis");
//* TODO: check if is a symlink, if target same keep it, either remove it
if(is_file($key_file)) {
$app->system->copy($key_file, $key_file.'.old'.$date);
$app->system->chmod($key_file.'.old.'.$date, 0400);
......@@ -1396,10 +1397,10 @@ class apache2_plugin {
$alias_seo_redirects = array();
switch($data['new']['subdomain']) {
case 'www':
$server_alias[] .= 'www.'.$data['new']['domain'].' ';
$server_alias[] = 'www.'.$data['new']['domain'].' ';
break;
case '*':
$server_alias[] .= '*.'.$data['new']['domain'].' ';
$server_alias[] = '*.'.$data['new']['domain'].' ';
break;
}
if(is_array($aliases)) {
......@@ -3061,12 +3062,12 @@ class apache2_plugin {
if(is_file('/etc/hhvm/'.$data['old']['system_user'].'.ini')) unlink('/etc/hhvm/'.$data['old']['system_user'].'.ini');
}
if(is_file('/etc/monit/conf.d/hhvm_' . $data['new']['system_user']) || is_file('/etc/monit/conf.d/00-hhvm_' . $data['new']['system_user'])){
if(is_file('/etc/monit/conf.d/hhvm_' . $data['new']['system_user'])){
unlink('/etc/monit/conf.d/hhvm_' . $data['new']['system_user']);
if(is_file('/etc/monit/conf.d/hhvm_' . $data['old']['system_user']) || is_file('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user'])){
if(is_file('/etc/monit/conf.d/hhvm_' . $data['old']['system_user'])){
unlink('/etc/monit/conf.d/hhvm_' . $data['old']['system_user']);
}
if(is_file('/etc/monit/conf.d/00-hhvm_' . $data['new']['system_user'])){
unlink('/etc/monit/conf.d/00-hhvm_' . $data['new']['system_user']);
if(is_file('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user'])){
unlink('/etc/monit/conf.d/00-hhvm_' . $data['old']['system_user']);
}
exec('/etc/init.d/monit restart >/dev/null 2>&1');
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment