Merge remote-tracking branch 'origin/master' into 0.10.0
This commit is contained in:
@@ -316,7 +316,7 @@ class Action
|
||||
case "file":
|
||||
if (array_key_exists('content', $action)) {
|
||||
CmdLineHandler::printwarn("Creating file '" . $action['name'] . "'");
|
||||
file_put_contents($action['name'], strtr($action['content'], $replace_arr));
|
||||
file_put_contents($action['name'], trim(strtr($action['content'], $replace_arr)));
|
||||
} elseif (array_key_exists('subcommands', $action)) {
|
||||
foreach ($action['subcommands'] as $fileaction) {
|
||||
if (array_key_exists('execute', $fileaction) && $fileaction['execute'] == "pre") {
|
||||
@@ -325,7 +325,7 @@ class Action
|
||||
exec(strtr($fileaction['content'], $replace_arr));
|
||||
} elseif ($fileaction['type'] == 'file') {
|
||||
CmdLineHandler::printwarn("Creating file '" . $fileaction['name'] . "'");
|
||||
file_put_contents($fileaction['name'], strtr($fileaction['content'], $replace_arr));
|
||||
file_put_contents($fileaction['name'], trim(strtr($fileaction['content'], $replace_arr)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,14 +98,28 @@ class SImExporter
|
||||
// when there were changes in the variable-name or similar
|
||||
unset($_data['panel.version']);
|
||||
unset($_data['panel.db_version']);
|
||||
|
||||
// validate we got ssl enabled ips when ssl is enabled
|
||||
// otherwise deactivate it
|
||||
if ($_data['system.use_ssl'] == 1) {
|
||||
$result_ssl_ipsandports_stmt = Database::prepare("
|
||||
SELECT COUNT(*) as count_ssl_ip FROM `" . TABLE_PANEL_IPSANDPORTS . "` WHERE `ssl`='1'
|
||||
");
|
||||
$result = Database::pexecute_first($result_ssl_ipsandports_stmt);
|
||||
if ($result['count_ssl_ip'] <= 0) {
|
||||
// no ssl-ip -> deactivate
|
||||
$_data['system.use_ssl'] = 0;
|
||||
// deactivate other ssl-related settings
|
||||
$_data['system.leenabled'] = 0;
|
||||
$_data['system.le_froxlor_enabled'] = 0;
|
||||
$_data['system.le_froxlor_redirect'] = 0;
|
||||
}
|
||||
}
|
||||
// store new data
|
||||
foreach ($_data as $index => $value) {
|
||||
Settings::Set($index, $value);
|
||||
}
|
||||
// save to DB
|
||||
Settings::Flush();
|
||||
|
||||
// all good
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<command>
|
||||
<visibility mode="true">{{settings.system.use_ssl}}
|
||||
</visibility>
|
||||
<content><![CDATA[a2enmod ssl]]></content>
|
||||
</command>
|
||||
<command>
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -4753,6 +4758,11 @@ aliases: files
|
||||
</visibility>
|
||||
<command><![CDATA[a2dismod php5]]></command>
|
||||
</commands>
|
||||
<commands index="5">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<command><![CDATA[/etc/init.d/apache2 restart]]></command>
|
||||
</commands>
|
||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||
dirty work -->
|
||||
<command><![CDATA[php {{const.FROXLOR_INSTALL_DIR}}/scripts/froxlor_master_cronjob.php --force]]></command>
|
||||
|
||||
@@ -49,6 +49,11 @@
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<command>
|
||||
<visibility mode="true">{{settings.system.use_ssl}}
|
||||
</visibility>
|
||||
<content><![CDATA[a2enmod ssl]]></content>
|
||||
</command>
|
||||
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -1752,6 +1757,11 @@ aliases: files
|
||||
</visibility>
|
||||
<command><![CDATA[a2dismod php5]]></command>
|
||||
</commands>
|
||||
<commands index="5">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<command><![CDATA[/etc/init.d/apache2 restart]]></command>
|
||||
</commands>
|
||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||
dirty work -->
|
||||
<command><![CDATA[php {{const.FROXLOR_INSTALL_DIR}}/scripts/froxlor_master_cronjob.php --force]]></command>
|
||||
|
||||
@@ -48,6 +48,11 @@
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<command>
|
||||
<visibility mode="true">{{settings.system.use_ssl}}
|
||||
</visibility>
|
||||
<content><![CDATA[a2enmod ssl]]></content>
|
||||
</command>
|
||||
<command>
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -4647,6 +4652,11 @@ aliases: files
|
||||
</visibility>
|
||||
<command><![CDATA[a2dismod php7.0]]></command>
|
||||
</commands>
|
||||
<commands index="5">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<command><![CDATA[/etc/init.d/apache2 restart]]></command>
|
||||
</commands>
|
||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||
dirty work -->
|
||||
<command><![CDATA[php {{const.FROXLOR_INSTALL_DIR}}/scripts/froxlor_master_cronjob.php --force]]></command>
|
||||
|
||||
@@ -49,6 +49,11 @@
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<command>
|
||||
<visibility mode="true">{{settings.system.use_ssl}}
|
||||
</visibility>
|
||||
<content><![CDATA[a2enmod ssl]]></content>
|
||||
</command>
|
||||
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -85,6 +90,11 @@ Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<command>
|
||||
<visibility mode="true">{{settings.system.use_ssl}}
|
||||
</visibility>
|
||||
<content><![CDATA[a2enmod ssl]]></content>
|
||||
</command>
|
||||
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -1761,6 +1771,11 @@ aliases: files
|
||||
</visibility>
|
||||
<command><![CDATA[a2dismod php5]]></command>
|
||||
</commands>
|
||||
<commands index="5">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<command><![CDATA[/etc/init.d/apache2 restart]]></command>
|
||||
</commands>
|
||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||
dirty work -->
|
||||
<command><![CDATA[php {{const.FROXLOR_INSTALL_DIR}}/scripts/froxlor_master_cronjob.php --force]]></command>
|
||||
|
||||
@@ -49,6 +49,11 @@
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<command>
|
||||
<visibility mode="true">{{settings.system.use_ssl}}
|
||||
</visibility>
|
||||
<content><![CDATA[a2enmod ssl]]></content>
|
||||
</command>
|
||||
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -85,6 +90,11 @@ Alias "/.well-known/acme-challenge" "{{settings.system.letsencryptchallengepath}
|
||||
<include>//service[@type='http']/general/commands</include>
|
||||
<command><![CDATA[a2dismod userdir]]></command>
|
||||
<command><![CDATA[a2enmod headers]]></command>
|
||||
<command>
|
||||
<visibility mode="true">{{settings.system.use_ssl}}
|
||||
</visibility>
|
||||
<content><![CDATA[a2enmod ssl]]></content>
|
||||
</command>
|
||||
<file name="/etc/apache2/mods-enabled/fastcgi.conf">
|
||||
<visibility mode="true">{{settings.phpfpm.enabled}}
|
||||
</visibility>
|
||||
@@ -5561,6 +5571,11 @@ aliases: files
|
||||
</visibility>
|
||||
<command><![CDATA[a2dismod php5]]></command>
|
||||
</commands>
|
||||
<commands index="5">
|
||||
<visibility mode="equals" value="apache2">{{settings.system.webserver}}
|
||||
</visibility>
|
||||
<command><![CDATA[/etc/init.d/apache2 restart]]></command>
|
||||
</commands>
|
||||
<!-- instead of just restarting apache, we let the cronjob do all the
|
||||
dirty work -->
|
||||
<command><![CDATA[php {{const.FROXLOR_INSTALL_DIR}}/scripts/froxlor_master_cronjob.php --force]]></command>
|
||||
|
||||
Reference in New Issue
Block a user